xml|線上 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+ 超級+無敵--------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[&quo