用XMLHTTP对象Post表单_XHTML/WEB_黑客防线网安服务器维护基地--Powered by WWW.RONGSEN.COM.CN

用XMLHTTP对象Post表单

作者:黑客防线网安XML教程基地 来源:黑客防线网安XML教程基地 浏览次数:0

本篇关键词:对象 /TD>Studio
黑客防线网安网讯:    试验如下:提交Form代码(Test.htm):<HTML><HEAD><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"><TITLE></TITLE><script language=javascript>function Test(){strA =...

    试验如下:

提交Form代码(Test.htm):

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<script language=javascript>
function Test()
{
strA = "submit1=Submit&text1=scsdfsd"; file://Looks like QueryString,But there's no "?" here!
var oReq = new ActiveXObject("MSXML2.XMLHTTP");
oReq.open("POST","http://ServerName/VDir/TstResult.asp",false);
oReq.setRequestHeader("Content-Length",strA.length);
oReq.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
oReq.send(strA);
txt1.document.write(oReq.responseText);
}
</script>
</HEAD>
<BODY>
<INPUT type=button value="go!" onclick="Test()"><br>
<IFRAME style="width:95%;height=85%;" name=txt1></IFRAME>
</BODY>
</HTML>

  这是接受Form数据的ASP很简单

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<TABLE border="1" cellpadding=0 cellspacing=0>
<%For Each Key In Request.Form%>
<TR>
<TD><%=Key%></TD>
<TD><%=Request.Form(Key)%></TD>
</TR>
<%Next%>
</TABLE>
</BODY>
</HTML>

Enjoy it! :)

    黑客防线网安服务器维护方案本篇连接:http://www.rongsen.com.cn/show-16210-1.html
网站维护教程更新时间:2012-04-06 01:12:40  【打印此页】  【关闭
我要申请本站N点 | 黑客防线官网 |  
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479

footer  footer  footer  footer