浏览器中的.asp回发地址

时间:2011-07-19 11:04:47

标签: html post asp-classic postback

已编辑:Java httpPost into .asp form

我想了解一下.asp 我有这个代码用于网页的登录表单和回发操作。 让我们假设该网页是www.xxx.com/index.asp

 <form method="post" id="form1" name="form1" action="">
 <div id="login" class="box">
  <div class="header">Log in</div>
  <div class="content">
   <label for="txtUser">User:</label>
   <input id="txtUser" name="txtUser" type="text" size="13" value="" />
   <label for="txtPassword">Password:</label>
   <input id="txtPassword" name="txtPassword" type="password" size="13" value="" />
   <input id="BLogin" name="BLogin" type="submit" value="Log in"  />
  </div>
  <div class="footer">
   <input type="checkbox" id="chkSave" name="chkSave"   /> <label for="chkSave">Save account</label>
  </div>
 </div>
 </form>

据我了解,如果我想填写浏览器窗口中的字段,我必须致电:

www.xxx.com/index.asp?txtUser=boris&txtPassword=boris&BLogin=Log in

但是浏览器中没有执行任何simmilar。我以这种方式思考有什么问题? :)

编辑:似乎在执行POST之前不必填写所有输入字段。这可能取决于服务器,在登录时,如果服务需要每次“记住我”字段,则可能必须填写。

1 个答案:

答案 0 :(得分:0)

表单方法是“POST”,这意味着表单数据在HTTP请求中的特殊数据块中发送,而不是作为URL的一部分发送。如果将方法更改为“GET”,则数据将在查询字符串中进行编码。

更多信息:http://www.cs.tut.fi/~jkorpela/forms/methods.html

相关问题