简体   繁体   English

在这种情况下,我应该使用post还是get方法来提交ajax表单吗?

[英]Should I use in this case post or get method for ajax form submission?

Should I use in this case method=" post " or method=" get " for ajax form submission? 在这种情况下,我应该使用method =“ post ”或method =“ get ”提交ajax表单吗?

Update: When should be used post and when get in case of ajax form submission? 更新:什么时候应该使用post,以及何时提交ajax表单?

<form  action="script.php" method="post">
  <label>Url: </label> 
  <input value="http://" id="url-input" type="text" size="100" /><br />
  <label>paste html file source: </label><textarea rows="10" cols="60"></textarea><br />
  <input type="checkbox" checked /> parse links<br />
  <input type="checkbox" checked /> parse images<br />
  <button type="submit" id="submit-html">Submit</button>
</form>

Thanks 谢谢

好吧,如果您要粘贴HTML源代码,则肯定要使用POST,这样就不会在使用GET的请求URI中以一百万个字符结尾...每当您使用textarea时,我都会说,您应该发布数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM