一个表单如下
<input type="text" name="key" id="key" action="index.php"/>
<input name="action" type="hidden" id="action" value="so" />
<input type="submit" name="button" id="button" value="提交" />index.php 在接收的时候,地址栏会出现
index.php?key=11&action=so&button=%CC%E1%BD%BB  ,其中 &action=so&button=%CC%E1%BD%BB  是我不需要的,如何屏蔽掉?

解决方案 »

  1.   

    把 <input name="action" type="hidden" id="action" value="so" />
    <input type="submit" name="button" id="button" value="提交" />
    去掉value就行了
    <input name="action" type="hidden" id="action" />
    <input type="submit" name="button" id="button" />
      

  2.   

    同意楼上,post方式提交,地址栏就没有了。
      

  3.   

    <form action='xxx.php' method='post'>
      

  4.   

    action=so&button=%CC%E1%BD%BB两个都去掉name 就不会提交了. 如果要提交就肯定会出现
    要么就修改GET为POST方式提交
      

  5.   

    POST方式。URL就不会出现变量。
      

  6.   

    不需要提交的不要放到form中~~