您现在的位置: 无忧电子商务网 >> 信息学院 >> 程序开发 >> asp >> 正文

ASP精华文摘-001(转)

作者:作者:未…    信息学院来源:网络收集    点击数:    更新时间:2006-8-27 我要参与讨论

  I don't know where to go<br>"
response.write "I recommend --> " & "<br>"
response.write server.htmlencode(thisURL & "/learn/test/res2.asp?where=fun") & "<br>"
response.write "for a good laugh!" & "<P>"
%>
</body></html>
=======================================================================================================================================
转贴-如何利用ASP实现邮箱访问(2000.03.21)

如何利用ASP实现邮箱访问

您在访问网站时是否会在有些页面上见到这种功能---您在可以访问此网站的同时,
还可以查看您免费邮箱中是否有新邮件。这个功能是不是让您觉得很心动、很神秘呢?
下面,我就用ASP来举个例子让您知道是如何实现这一功能的。

首先你可以去一些提供免费邮件服务的站点,申请一个账号然后登录。在打开邮箱时,
请您注意地址栏中的内容。现在以371为例,你会发现其内容通常是:
http://www.371.net/prog/login?user=fighter&pass=mypassword。
其中"fighter"是您的账号,"mypassword"是您的密码。这时我们可以从这里得到3个信息。
第1条是我们得到了处理文件的url及文件名:"http://www.371.net/prog/login";
第2条是记录您账号的变量名:user;第3条是记录您密码的变量名:pass。
我们知道这些信息后,就可着手写html文件和asp文件了。

'/*Html源文件内容如下:*/
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<title>City Club 首页</title>
<style type="text/css">
<!--
td { font-size: 9pt}
body { font-size: 9pt}
select { font-size: 9pt}
A {text-decoration: none; color: #003366; font-size: 9pt}
A:hover {text-decoration: underline; color: #FF0000; font-size: 9pt}
-->
</style>
<script language="javascript">
function check(tt) {
if (window.document.form1.selectmail.selectedIndex==0) {
alert("请选择您的邮箱服务器!")
window.document.form1.selectmail.focus()
return false
}
if (tt.account.value=="") {
alert("帐号不能为空!请填写。")
tt.account.focus()
return false
}
if (tt.account.value.length<3) {
alert("帐号长度不能小于3位!请填写。")
tt.account.focus()
return false
}
if (tt.password.value=="") {
alert("密码不能为空!请填写。")
tt.password.focus()
return false
}
if (tt.password.value.length<3) {
alert("密码长度不能小于3位!请填写。")
tt.password.focus()
return false
}
else
return true
}
</script>
<BODY topmargin=12>
<table border=0 bgcolor=d3d3d3>
<td>
<form action="PostOffice.asp" method=post Onsubmit="return check(this)" name=form1
target="_blank"> <!--此处用target="_blank",是为了弹出新窗口来查看您的邮箱-->
<select style="font-size:9pt;background-color:add8e6" name="selectmail">
<option name="mailsite" value="City Club便民邮局" selected>City Club便民邮局</option>
<option name='MailSite' value='990.net/prog/login?;user;pass;'>990</option>
<option name='MailSite' value='www.371.net/prog/login?;user;pass;'>371</option>
<option name='MailSite' value='www.188.net/prog/login?;user;pass;'>188</option>
<option name='M

上一页  [1] [2] [3] [4] 下一页

在google里搜索更多ASP精华文摘-001(转)

Google
Web www.51ec.org
【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
我来说两句 对此文章发表了评论
  昵 称: *必填    ·注册用户·
  评 分: 1分 2分 3分 4分 5分     严禁发表危害国家安全、政治、黄色淫秽等内容的评论,用户需对自己在使用本网站服务过程中的行为承担法律责任。本站管理员有权保留或删除评论内容,评论内容只代表机友个人观点,与本网站立场无关。  
评 论
内 容

 
评论列表 (最新 评论仅限网友观点!)

供求信息




| 设为首页 | 加入收藏 | 关于我们 | 广告服务 | 联系方式 | 友情链接 | 版权申明