<form action="registerdo.aspx" method="post">
    <table border="1">
        <tr>
            <td>
                用户名:
            </td>
            <td>
                <input id="uname" type="text" onblur="check(this.value)" /><div style="display: inline"
                    id="unamediv">
                </div>
            </td>
        </tr>
        <tr>
            <td>
                密码:
            </td>
            <td>
                <input id="upass" type="password" />
                <div style="display: inline">
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input id="Button1" type="button" value="注册" onclick="register()"/>
            </td>
        </tr>
    </table>
    </form>这是一个普通的静态页面中的一段代码,大体意思能看明白吧,重点是Form的那个Action的值,这个静态页面的Form表单所提交的路径是个aspx页面,我想请教各位大哥,怎样能在那个aspx页面获得值呢

解决方案 »

  1.   

    在form标签里定义onsubmit事件,然后编写js获取你想要的值,再用loctation.href='/registerdo.aspx?uname=你所取到的值'就可以啦
      

  2.   

    Request.Form["uname"]使用 name属性而不是id
    <input name="uname" type="text" onblur="check(this.value)" />
      

  3.   

    你需要百度一下form表单的知识  .- -
      

  4.   

    需要修改下你HTML代码:
    <input id="uname" name="uname" type="text" onblur="check(this.value)" />另一个获取的页面应该写为:
     Request.Form["uname"];
      

  5.   

    #5楼 +1;action  post提交数据是提交的  <input>标签中的数据    action目的地址接受是  Request.Form["xxx"];
      

  6.   

    表单加上name属性,如<input id="uname" name="uname" type="text" onblur="check(this.value)" />
    后台获取:Request.Form["uname"]
      

  7.   

    页面提交:document.getElementById("form1").submit();
    取值:string keyCode=Request["keyCode"];
      

  8.   

    不复杂的,很多传值方法。楼下都说过了。可在URL地址传值,接收页面 Request["name"];