㊣㊣㊣㊣㊣㊣㊣这段代码是什么机理?㊣㊣㊣㊣㊣㊣㊣
<SCRIPT language="vbscript">
Sub Window_OnLoad()
PageRecordCount.value =10 '每页记录数
getNumberOfPages
tblHD.dataPageSize=10
FlashButton
btnQuery_onclick()
End Sub
Sub btnAdd_OnClick(Method)
dim i,xmlDoc,xmlcmd,xmlhttp
i=0
i=window.event.srcElement.sourceindex
Set xmlDoc = CreateObject("Msxml.DOMDocument")
xmlDoc.async = False
Set root = xmlDoc.createElement("CompanyRoot")
Set CategoryElm = xmlDoc.createElement("CompanyElem")
root.appendChild CategoryElm
do until document.all.item(i).tagname="TR"
if document.all.item(i).tagname="INPUT" and document.all.item(i).ID<>"" or document.all.item(i).tagname="SELECT" then
if document.all.item(i).ID="CompanyName" then
if document.all.item(i).value="" then
msgbox "公司名不能为空!"
document.all.item(i).focus()
exit sub
end if
end if
Set NewElm = xmlDoc.createElement(document.all.item(i).ID)
NewElm.text=document.all.item(i).value
CategoryElm.appendChild NewElm
end if
i=i-1
loop
xmlDoc.appendChild root
set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "POST","Company.aspx?Action="&Method,false
xmlhttp.Send xmlDoc.xml '发送数据
If xmlHTTP.responseXML.SelectNodes("/Error").Length>0 Then
Msgbox xmlHTTP.responseXML.SelectSingleNode("/Error").Text
Else
Msgbox "操作成功!"
window.location.reload
End If
End Sub
Sub btnQuery_onclick()
dim QueryCondition
if Region.value="" then
QueryCondition=""
else
QueryCondition="RegionID='"®ion.value&"'"
end if
set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "POST","Company.aspx?Type=Query&QueryCondition="&QueryCondition,false
xmlhttp.Send '发送数据
If xmlHTTP.responseXML.SelectNodes("/Error").Length>0 Then
Msgbox xmlHTTP.responseXML.SelectSingleNode("/Error").Text
Else
xmlApp.loadxml xmlHTTP.responseXML.xml'window.location.reload
End If
End Sub
</SCRIPT>