网站用户注册登录模板css样式上传到那个文件夹?

html-css012

网站用户注册登录模板css样式上传到那个文件夹?,第1张

这个要看引用文件的路径了。

比如在用户登录html中,引用的reg.css和login.css标签如下:

 

 (1)<link href='reg.css' type='text/css' rel='stylesheet' />

(2)<link href='css/login.css' type='text/css' rel='stylesheet' />

reg.css的路径前没有什么文件夹,说明reg.css的路径是与html文件存放在同一个文件夹下的,而login.css 前面多了'css/',这说明,login.css是存放在与html同一文件夹中的一个css文件夹中,举例说明如下:

 

 A文件夹中有:(1)html登录注册.html (2)reg.css(3)css文件夹【即是B文件夹】

而B文件夹中:(1)login.css

而UserAjax.rar是一个压缩文件吧?解压后,看你把文件放哪了,就在script标签中的src中设置好路径就行了,跟上面link标签中的href属性一样。

1、ASP文件中的代码

pencat=rs.Fields.Item("m_content").Value

pencat=replace(pencat,"t_title",n_title)

pencat=replace(pencat,"t_author",n_author)

pencat=replace(pencat,"t_content",n_content)

Set fso = Server.CreateObject("Scripting.FileSystemObject")

Set fout = fso.CreateTextFile(server.mappath(fpath&"\" &fname))

fout.WriteLine pencat

fout.close

2、如下给出要生成的网页模板:

<html>

<head>

<meta http-equiv=""Content-Language"" content=""zh-cn"">

<meta http-equiv=""Content-Type"" content=""text/htmlcharset=gb2312"">

<meta name=""GENERATOR"" content=""Microsoft FrontPage 4.0"">

<meta name=""ProgId"" content=""FrontPage.Editor.Document"">

<title></title>

</head>

<body topmargin=""0"" leftmargin=""0"">

<table border=""0"" width=""760"" height=""100%"" background=""background.jpg"" >

<tr>

<td width=""752"" height=""10"" colspan=""3"">

<p align=""center"">t_title

</td>

</tr>

<tr>

<td width=""752"" height=""18"" colspan=""3"">

<div align=""center"">

</div>

<div align=""center"">

<font size=""2"">

作者:</font><font color=""#990000"">t_author</font>

<font size=""2"">

加入时间:</font><font color=""#990000"">t_date</font>

</div>

</td>

</tr>

<tr>

<td width=""15%"" height=""100%"" valign=""top"">

</td>

<td width=""70%"" height=""100%"" valign=""top"">

t_content

</td>

<td width=""15%"" height=""100%"" valign=""top"">

</td>

</tr>

</table>

</body>

</html>

3、解释

(1)pencat=rs.Fields.Item("m_content").Value

pencat为一个字符串变量。

rs.Fields.Item("m_content").Value就是如上2、网页模板的全部HTML字符

(2)pencat=replace(pencat,"t_title",n_title)

pencat=replace(pencat,"t_author",n_author)

pencat=replace(pencat,"t_content",n_content)

以上三句就是将字符串中的字串替换成为你所需要的内容,即ASP中动态获得的内容。

(3)Set fso = Server.CreateObject("Scripting.FileSystemObject")

Set fout = fso.CreateTextFile(server.mappath(fpath&"\" &fname))

fout.WriteLine pencat

fout.close

以上为将刚刚组合所得的网页代码写入文件的过程。第一句定义fso文件,第二句创建输出流文件,其中fpath为你想要存储的文件的路径,fname为文件名;后两句是将字符串写入文件和关闭输出流文件。

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title></title>

<style>

body{

height:500px

background: linear-gradient(#A6CADE,#F8C6F8) no-repeat

}

ul,li,div {

padding:0margin:0

}

.container{

width: 500px

margin:0 auto

}

#tab-con div{

display: none

width:500px

height:282px

}

#tab-con div img{

width: 100%

height:100%

}

#tab-con div.active{

display: block

}

#tab-list ul li{

float:left

list-style: none

}

#tab-list ul li a{

display: block

width:70px

text-align: center

text-decoration: none

color:#000

background: #D6D6D1

}

#tab-list ul li.active a{

color:#fff

background:#f96302

}

</style>

</head>

<body>

<div class="container">

<div id="tab-con">

<div class="active"><img src="img/test1.jpg"></div>

<div><img src="img/test2.jpg"></div>

<div><img src="img/test3.jpg"></div>

<div>图片4</div>

<div>图片5</div>

<div>图片6</div>

<div>图片7</div>

</div>

<div id="tab-list">

<ul>

<li><a href="javascript:">首页</a></li>

<li><a href="javascript:">美食</a></li>

<li><a href="javascript:">交通</a></li>

<li><a href="javascript:">图片4</a></li>

<li><a href="javascript:">图片5</a></li>

<li><a href="javascript:">图片6</a></li>

<li><a href="javascript:">图片7</a></li>

</ul>

</div>

</div>

<script>

var tablist = document.getElementById('tab-list').getElementsByTagName('li')

var tabcon = document.getElementById('tab-con').getElementsByTagName('div')

for(var i = 0 i<tablist.length i++){

tablist[i].onclick = function(){

starttab(this)

}

}

function starttab(obj){

for(var i = 0 i<tablist.length i++){

if(tablist[i] == obj){

tablist[i].className = "active"

tabcon[i].className = "active"

}else{

tablist[i].className = ""

tabcon[i].className = ""

}

}

}

</script>

</body>

</html>