Summer Fun Huge offer ~------Super + Invincible--------xml+javascript+asp online short message Function! (8)

Source: Internet
Author: User
Tags contains
xml| Online +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+ Super + Invincible--------xml+javascript+asp online Short Message Function---Introduction
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



---------The following file is the Writexml.asp page that contains the WriteXml function-----------

<%
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 ("content")
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
%>



-----------------------below is a xmlcode.js file that contains the code function----------
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)
}


---------------------Below is a pace.js file that contains the PACE function------------

Check if the argument is an empty string, NULL returns TRUE, or False

function Pace (STR)
{
var Reg = new RegExp ("", "GI")
STR = str.replace (Reg, "")
Reg = new RegExp ("\ r", "GI")
STR = str.replace (Reg, "")
Reg = new RegExp ("\ n", "GI")
STR = str.replace (Reg, "")
Delete (Reg)
if (Str = "")
{
Return (TRUE)
}
Else
{
Return (false)
}
}

-------------------below is the Xmlhttp.js file that contains the Send function---------------
function Send (Str,url)
{
var Http = new ActiveXObject ("Microsoft.XMLHTTP")
var Dom = new ActiveXObject ("Microsoft.XMLDOM")
Http.open ("POST", Url,false)
Http.send (STR)
Dom.async=false
Dom.loadxml (Http.responsetext)
if (Dom.parseError.errorCode!= 0)
{
Delete (Http)
Delete (Dom)
Return (false)
}
Else
{
var back = Dom.documentElement.childNodes.item (0). Text
Delete (Http)
Delete (Dom)
Return (back)
}
}



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.