你可以在</head>标签后世核面加个<body bgcolor="颜色值">颜色值可以为十进制 十六进制或关键字
如:要设为红色
bgcolor="#FF0000" 或bgcolor="red" 或 bgcolor=RGB(255,0,0)都可以
字体加大的话可以简单的用
<font size="数字">要设定字号的字</font>
的形式纳返唯更洞培改
以上都是简单的没用css不知道你的css基础怎么样 你就用这种方法吧 一般不会出什么大问题
超简单的代码,适合入门的时候用,共6个文件,其中data.mdb是数据库文件,enter.htm是登陆界面,ent_submit.asp是判断能否成功登陆的文件,login.asp是登陆成功后跳转到的页面,register.htm是注册会员的界面,reg_submit.asp是处理注册信息的文件。1.enter.htm文件
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312">
<title>无标题文档</title>
</head>
<body>
<form name="form1" method="post" action="ent_submit.asp">
<p></p>
<p>用户名:
<input name="username" type="text" id="username" size="20">
</p>
<p>密 码:
<input name="password" type="password" id="password" size="16">
</p>
<p>
<input type="submit" name="Submit" value="登陆">
<a href="register.htm">注册为会员</a></p>
</form>
</body>
</html>
2.ent_submit.asp文件
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312">
<title>无标题文档</title>
</head>
<body>
<%
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)}dbq="&server.mappath("data.mdb")
username=request.form("username")
password=request.form("password")
sql="select * from user where username='"+username+"' and password='"+password+"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
if rs.eof then
response.Write("<script>alert('用户名或密码错误,请重新输入!')history.back(-1)</script>")
else
response.Write("<script>alert('登录成功!')history.back(-1)</script>")
response.redirect"login.asp"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</body>
</html>
3.login.asp文件
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 {
font-size: 18px
font-weight: bold
}
-->
</style>
</head>
<body>
<div align="center">
<p></p>
<p></p>
<p></p>
<p></p>
<p class="style1">成功登录转到该页面</p>
</div>
</body>
</html>
4.register.htm文件
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 {font-size: 14px}
-->
</style>
</head>
<body class="style1">
<form name="form1" method="post" action="reg_submit.asp">
<p></p>
<p>用户名:
<input name="username" type="text" id="username" size="20">
</p>
<p>密 码:
<input name="password" type="password" id="password" size="16">
</p>
<p>
<input type="submit" name="Submit" value="注册">
<a href="enter.htm">返回登录页面</a></p>
</form>
</body>
</html>
5.reg_submit.asp文件
<%
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)}dbq="&server.mappath("data.mdb")
username=request.form("username")
password=request.form("password")
exec="select * from user where username='"&username&"'"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
if username="" or password="" then
response.Write("<script>alert('用户名或密码不能为空!')history.back()</script>")
else
if not rs.eof then
response.Write("<script>alert('对不起,该帐号已有人注册了,请重新输入!')history.back() </script>")
else
sql="insert into user(username,password) values('"+username+"','"+password+"')"
conn.execute sql
response.write("<script>alert('注册成功!')history.back()</script>")
end if
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
6.data.mdb文件
这个需要你自己建立一个名为data.mdb的ACCESS数据库,没有安ACCESS的需要先安装好,然后在data.mdb里面再建立一个名为USER的表,表字段如下:
id:自动编号
username:文本型
password:文本型
源码可以说是做网站的程序 ,ASP是一种语言。传到自己的空间,如孝租果功能完整则只需要对模版(网站的样子 通俗的说)修改下。
简单的说建一个新站的步骤:
1、有自己的空圆慎带间(ASP程序 则要确定空间支持)、域名
2、将域名解析到空间IP,并且在空间后台也绑定该域名
3、FTP传程序 等待上传---
4、域名登陆网站、以及后台修改设置
5、优化 叫别人测试橘芦 引外链
等等
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)