暑期缤纷巨献之~------超级+无敌--------XML+javascript+ASP

80酷酷网    80kuku.com

  xml|在线+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+           超级+无敌--------XML+JAVASCRIPT+ASP在线短信息功能---介绍
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


来看看登陆页面LOGIN.ASP,代码比较长,也可以修改一下页面,使它更美观:

<%option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = 0
%>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title></title>
<!--#include Virtual="/turbo/Inc/checkUsers_inc.asp"-->
<!--上面加载的是一个验证用户登陆的密码和用户名的文件,这里就不列举了.重要的是,
这个文件,如果用户登陆成功,会生成2个COOKIES,一个叫MyID,保存的是用户的ID,
一个叫MyName,保存的是用户的用户名.这2个COOKIES很重要,将在以后用到.
-->

<!--下面的JAVASCRIPT代码应该把它存为一个JS文件,那样以后用户再次访问.速度会加快-->

<SCRIPT LANGUAGE=Javascript>
<!--
function SendInformation() // 如果有新信息,点击ID为INFORMATION的DIV,就弹出查看信息的窗口
{

                                   if( Count < (XmlDom_Length-1))
                                   {
                                   playmusic('music1','play()')
                                   Count = Count + 1
                                   }
                                   else
                                   {
                                   Count = Count + 1
                                   eChang(false)
                                   }
OpenWin("../onlineInformation/GetInformation.htm","GetInformation")
}

function OpenWin(Url,WinName) //打开新窗口的函数
{
window.open(Url,WinName,"width=324,height=214,resizable=no,scrollbars=no,left=" +((screen.availWidth/2)-200) + ",top=" + ((screen.availHeight/2)-150))
}


function ReMove() //这个函数是删除用户已经看过的信息.删除完再重新刷新XML数据.
{
XmlDomHttp.open("POST","../onlineInformation/eChangXml.asp",false)
XmlDomHttp.send(XmlDom)
Dom.loadXML(XmlDomHttp.responseText)
                                if(Dom.parseError.errorCode != 0)
                                {
                                alert("Sorry.\b出现了错误.在线信息功能已经停止.你可以按\b\"刷新\"\b再试一次!!.")
                                }

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: