服务器端Request不到Ajax客户端的提交的URL参数值 - Web 开发 / Ajax
客户端提交调用AjaxUpdater.Update("GET","userValidator.asp",display);
后,服务器端Request不到userName和Password值
如果
AjaxUpdater.Update("GET","userValidator.asp?userName=mikel&password=mikel",display);
function initialize(){ //alert("userValidator.asp"); AjaxUpdater.Update("GET","userValidator.asp",display);}function display(){ try{ if(Ajax.checkReadyState('loading')=='OK') { alert("here"); info=Utilities.getElement("info"); //alert(Ajax.getResponse()); info.innerHTML=Ajax.getResponse(); } }catch(e) { //alert(e); document.write(e); }}</script>
<body><div id="loading"></div><div id="info"><form method="post"><div>用户登陆</div><div>用户名:<input type="text" id="userName" name="userName"/></div><div>密码:<input type="text" id="password" name="password"/></div><div><input type="button" value="submit" onclick="initialize();" /></div></form></div></body></html>
<% 'Response.Write("<div>测试</div>") 'if Request("Action")="login" then userName=Request.QueryString("userName") password=Request.QueryString("passWord") if Request.QueryString("userName")="" or Request.QueryString("password")="" then Response.Write("<div>Is Empty</div>") else Set rs=Server.CreateObject("ADODB.RecordSet") sql="select * from userInfo where userName='"&userName&"' and password='"&password&"'" 'response.write sql rs.open sql,conn,2,2 if not rs.EOF then 'Response.Cookies("userInfo") Response.Write("<div id='panel'><div>我的收藏</div><div>修改资料</div><div>我的好友</div></div>")else Response.Write("<div>登陆失败</div>") end if end if 'end if%>