|
源代码网推荐
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + 超级+无敌--------XML+javascript+ASP在线短信息功能---介绍 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------下面这个文件就是查看信息的GetInformation.htm文件,代码比较长.慢慢看看---------------
<HTML> <head> <title>回复信息</title> <meta http-equiv="Content-Type" content="text/HTML; charset=gb2312"> <link rel="stylesheet" href=../../"../style/style.CSS" type="text/CSS"> <link rel="stylesheet" href=../../"../style/onlineInformation.CSS" type="text/CSS"> <script LANGUAGE="JavaScript" SRC=../../"../script/XMLCode.js"></script> <!--上面加载了一个Code函数,用来替换回复的信息里的特殊字符--> <script LANGUAGE="JavaScript" SRC=../../"../script/XMLHttp.js"></script> <!--上面加载了一个XMLHTTP函数,是发送信息/取回发送返回值的函数--> <script LANGUAGE="JavaScript" SRC=../../"../script/Pace.js"></script> <!--上面加载了一个PACE函数,用来检查回复信息时,回复的内容是否为空,是就返回TRUE--> <SCRIPT LANGUAGE=JavaScript> <!-- window.focus()
var Cursor = window.opener //上一层窗口对象 var NN = false Cursor.parent.document.body.onunload = Close //首页关闭,本窗口就关闭,因为本窗口需要取得上层窗口的信息
if(Cursor.XMLDom.documentElement.childNodes.length == 0) { window.location = "NewInformation.htm" //如果用户按下刷新(F5),会导致数据无法取得并显示,转向发送新信息页面 NN = true } else { var XMLDom = Cursor.XMLDom.documentElement.childNodes.item(Cursor.Count-1) var Name = XMLDom.attributes.getNamedItem("NAME").nodeValue var Date = XMLDom.attributes.getNamedItem("DATE").nodeValue var NodeText = XMLDom.text var MissYou = XMLDom.attributes.getNamedItem("ID").nodeValue }
function Close() { window.close() }
function Init() { if(NN) { return } Format(Name,Date,NodeText) if(Cursor.Count == Cursor.XMLDom_Length) { Cursor.ReMove() } }
function Format(To,Dates,Text) { document.all["to"].innerHTML = To document.all["dates"].innerHTML = Dates document.all["text"].value = Text }
function eChangTextArea(Bool) { var A3; var A2; var A4; var A5; var A6; var A7 if(Bool == true) { A2 = "#ffffff" A3 = "#aaa697 1px solid " A4 = "" document.all["text"].value = A4 A5 = "<a href="javascript:FormSubmit()">发送</a>" A6 = "<a href="javascript:eChangTextArea(false)">原始信息</a>" A7 = "#DFDED9" document.all["text"].disabled = false document.all["text"].focus() } else { A2 = "#EBEAE7" A3 = "" A5 = "<a href="javascript:eChangTextArea(true)">回复</a>" A6 = " " A7 = "#EBEAE7" Init() document.all["text"].disabled = true } text.style.border = A3 text.style.backgroundColor = A2 document.all["Send"].innerHTML = A5 document.all["k"].innerHTML = A6 document.all["client"].bgColor = A7 }
--> </SCRIPT>
<SCRIPT LANGUAGE=javascript> <!-- function FormSubmit() { var text = document.all["text"].value if(Pace(text)) { alert("Sorry.您所要回复的信息内容不能为空") document.all["text"].focus() document.all["text"].select() } else { hidden.style.zIndex = 5 Check(Send("<农村娃娃出品-必属精品><可爱QQ>" + MissYou + "</可爱QQ><可爱QQ>" + code(text) + "</可爱QQ></农村娃娃出品-必属精品>","MissYou.ASP")) }
}
function Check(OH) { if(OH == false) { Y(true) } else { if(eval(OH)) { Y(true) } else { Y(false) } } }
function Y(Bool) { if(Bool) { alert("Sorry.信息发送失败.请再试一遍") hidden.style.zIndex = 0 document.all["text"].focus() } else { window.location = "NewInformation.htm" } } --> </SCRIPT> </head> <body bgcolor="#DFDED9" text="#000000" onload="Init()"> <div id="hidden" style="position:absolute; left:0px; top:0px; width:324px; height:214px; z-index:0; background-color: #DFDED9; layer-background-color: #DFDED9; border:
源代码网供稿. |