+ -
当前位置:首页 → 问答吧 → asp如何接收和返回post提交的信息

asp如何接收和返回post提交的信息

时间:2011-12-15

来源:互联网

C# code


发送
$.post("Admin_wenda.asp",{id:"123"},function(data){
                alert(data);   
             },"json");


接收
<% 
if Request.Form("id")<>"" then
  Response.Write("{aa:接收失败!}")
else 
  Response.Write("{aa:接收成功!}")
end if
%>






为什么返回接收不到值,不懂asp,会的帮忙下~~~

作者: planet5563   发布时间: 2011-12-15

VBScript code
<%
'非表单发送方法:Admin_wenda.asp?id=123

'表单传递
'发送:
%>


HTML code
<script>
  document.form1.submit();
</script>
<form name="form1" method="post" action="Admin_wenda.asp">
   <input name="id" id="id" type="hidden" value="123"/>
</form>


VBScript code

'接收:
<%
response.write(request("id"))
%>

作者: xmlife   发布时间: 2011-12-15