技巧打开网页进行客户个性化信息提交(代码编写)
2011-07-04 02:55
465 查看
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。/article/4239468.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 transitional//EN "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<title>客户个性化信息提交</title>
</head>
<body>
<%
'获取提交的表单信息 $bgcolor=Request.Form("bgcolor")
$fgcolor=Request.Form("fgcolor")
$pwd=Requesr.form("pwd">
'如果提交的客户信息不为空,则将其存储到Cookie集合check中
If bgcolor<>""or fgcolor<>""Then
Response.Cookies("check")("bgcolor")=$bgcolor
Response.Cookies("check")("fgcolor")=$fgcolor
Response.Cookies("check")("pwd")=$pwd
Response.Cookies("check").Expires=#2010-5-6#
End If
'读取 Cookie
$bgcolor=Request.Cookies("check")("$bgcolor") $fgcolor=Request.Cookies("check")("$fgcolor")
$pwd=Request.cookies("check")("$pwd")
'如果Cookie在用户的计算机上不存在,就创建一个表单,询问相关信息 If $bgcolor ="" and $fgcolor ="" and $pwd=""Then
%>
<h2 align="center">客户个性信息提交</h2>
<Form action="checkcookies.asp" method="POST">
<table border="1" cellspacing="0" align="center">
<tr>
<td>背景色:</td>
<td><input type="text" name="bgcolor"></td>
</tr>
<tr>
<td>背景色:</td>
<td><input type="text" name="fgcolor"></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" name="pwd"></td>
</tr>
<tr>
<td colspan="2" align="center"><input name="submit" type="submit" value="提交">
</td>
</tr>
</table> </Form>
<%
End If
'如果Cookie已经存在,并且bgcolor存在,就跳转到color.asp If bgcolor<>""Then
Response.Redirect "color.asp"
End If
%>
</body>
</html>
以下图是应用在线软件“Dreamweaver 8 ”应用工具测试“客户个性化信息提交表单”测试结果,(540*452)像素
以下是IE6浏览器测试结果(540*452像素)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 transitional//EN "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<title>客户个性化信息提交</title>
</head>
<body>
<%
'获取提交的表单信息 $bgcolor=Request.Form("bgcolor")
$fgcolor=Request.Form("fgcolor")
$pwd=Requesr.form("pwd">
'如果提交的客户信息不为空,则将其存储到Cookie集合check中
If bgcolor<>""or fgcolor<>""Then
Response.Cookies("check")("bgcolor")=$bgcolor
Response.Cookies("check")("fgcolor")=$fgcolor
Response.Cookies("check")("pwd")=$pwd
Response.Cookies("check").Expires=#2010-5-6#
End If
'读取 Cookie
$bgcolor=Request.Cookies("check")("$bgcolor") $fgcolor=Request.Cookies("check")("$fgcolor")
$pwd=Request.cookies("check")("$pwd")
'如果Cookie在用户的计算机上不存在,就创建一个表单,询问相关信息 If $bgcolor ="" and $fgcolor ="" and $pwd=""Then
%>
<h2 align="center">客户个性信息提交</h2>
<Form action="checkcookies.asp" method="POST">
<table border="1" cellspacing="0" align="center">
<tr>
<td>背景色:</td>
<td><input type="text" name="bgcolor"></td>
</tr>
<tr>
<td>背景色:</td>
<td><input type="text" name="fgcolor"></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" name="pwd"></td>
</tr>
<tr>
<td colspan="2" align="center"><input name="submit" type="submit" value="提交">
</td>
</tr>
</table> </Form>
<%
End If
'如果Cookie已经存在,并且bgcolor存在,就跳转到color.asp If bgcolor<>""Then
Response.Redirect "color.asp"
End If
%>
</body>
</html>
以下图是应用在线软件“Dreamweaver 8 ”应用工具测试“客户个性化信息提交表单”测试结果,(540*452)像素
以下是IE6浏览器测试结果(540*452像素)
相关文章推荐
- 网页制作:HTML代码编写的30条技巧
- 使用Form表单向远处的网页提交信息代码__Cookie方式
- 通过JavaScript打开网页方式进行分享-转最简单易用的开心网、人人网、新浪微博、腾讯微博、QQ空间分享代码
- 表单提交数据的方式 怎么在服务器获取 服务器控件 html服务器控件 提交服务器之前的验证 前台网页编写c#代码
- IOS开发技巧--xcode高版本编写代码低版本打开方法
- Python编写网页爬虫爬取oj上的代码信息
- Python编写网页爬虫爬取oj上的代码信息
- 两行代码取得当前网站的(无交互状态下的)网页html源代码就够了,不用对asp.net网页设计技术进行一点点倒退
- WEB前端代码编写技巧
- 编写一个手机类(Mobile),包括手机品牌(brand)、手机型号(type), 方法包括显示手机信息,并编写测试类进行对象的创建
- Linux C语言编程-Linux网络通信--Linux上使用套接字(socket)来处理信息---编写一个单进程非阻塞多客户的套接字客户端
- 超实用git技巧之提交前后代码导出
- 实现网页打开进度条的一小段代码
- 网页上的所有链接页面都在新窗口打开的技巧
- Sublime Text、webstorm等编译器快速编写HTML/CSS代码的技巧
- jsp调用getParameter获取客户提交的信息
- 编写一个手机类(Mobile),包括手机品牌(brand)、手机型号(type), 方法包括显示手机信息,并编写测试类进行对象的创建
- 编写一个手机类(Mobile),包括手机品牌(brand)、手机型号(type), 方法包括显示手机信息,并编写测试类进行对象的创建
- 编写高质量代码改善C#程序的157个建议——建议17:多数情况下使用foreach进行循环遍历
- 编写一个手机类(Mobile),包括手机品牌(brand)、手机型号(type), 方法包括显示手机信息,并编写测试类进行对象的创建