㊣㊣㊣㊣㊣㊣㊣这段代码是什么机理?㊣㊣㊣㊣㊣㊣㊣

CDEFGAB 2004-12-06 04:39:45
<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>
...全文
99 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
火电 2004-12-23
  • 打赏
  • 举报
回复
就是登陆的提交过程啊

不是在aspx中作的

在html中输入用户信息后然后生成一个信息xml,使用http对象的post方法

发送到对应后台的处理也面 aspx中

在到后台解析这个xml

判断用户是否正确等等

再返回xml结果

到前台再解析
leeyeefeng2004 2004-12-09
  • 打赏
  • 举报
回复
本人看.....估计是输入表单,将表单数据搞成一个xml文档.然后发送出去
jinseyd 2004-12-08
  • 打赏
  • 举报
回复
up!

8,909

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧