暑期缤纷巨献之~------超级+无敌--------XML+JAVASCRIPT+ASP在线短信息
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 超级+无敌--------XML+JAVASCRIPT+ASP在线短信息功能---介绍
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
---------下面的文件就是包含WRITEXML函数的WRITEXML.ASP页-----------
<%
Function WriteXml(Dom,Path,MyID,MyName,DATES,ONLY,Text)
On Error Resume Next
Dim R
Dom.Load Path
If Dom.parseError.errorCode <> 0 Then
WriteXml = True
Else
Set R = Dom.CreateElement("内容")
With R
.setAttribute "ID",MyID
.setAttribute "NAME",MyName
.setAttribute "DATE",DATES
.setAttribute "ONLY",ONLY
.Text = Text
Dom.documentElement.AppendChild R
End With
Application.Lock
Dom.Save Path
Application.unLock
End If
If Err.number<>0 Then
Err.Clear
WriteXml = True
End If
End Function
%>
-----------------------下面的是一个XMLCODE.JS文件,包含CODE函数----------
function code(Str)
{
var A = new RegExp("'","gi")
var B = new RegExp(""","gi")
Str = Str.replace(/&/gi,"&")
Str = Str.replace(/</gi,"<")
Str = Str.replace(/>/gi,">")
Str = Str.replace(A,"'")
Str = Str.replace(B,""")
delete(A)
delete(B)
return(Str)
}
---------------------下面的是一个PACE.JS文件,包含PACE函数------------
// 检查传来的参数是否为空字符串,空返回TRUE,否则返回FALSE
function Pace(Str)
{
var Reg = new RegExp(" ","gi")
Str = Str.replace(Reg,"")
Reg = new RegExp("","gi")
Str = Str.replace(Reg,"")
Reg = new RegExp(" ","gi")
Str = Str.replace(Reg,"")
delete(Reg)
补充:asp教程,高级应用