使用POST方法将参数发布到URL而不使用表单 [英] Posting parameters to a url using the POST method without using a form

查看:100
本文介绍了使用POST方法将参数发布到URL而不使用表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用POST方法将参数发布到URL,但我无法使用表单。即使我使用表单,它也必须在用户交互时自动发布。这可能吗?我怎么做到这一点?

I want to post parameters to a URL using the POST method but I cannot use a form. Even if I do use a form, it would have to be auto-posted with out user interaction. Is this possible? How can I do this?

推荐答案

您可以使用JavaScript和XMLHTTPRequest(AJAX)执行POST,而无需使用表单。查看此链接。请记住,您需要在浏览器中启用JavaScript。

You could use JavaScript and XMLHTTPRequest (AJAX) to perform a POST without using a form. Check this link out. Keep in mind that you will need JavaScript enabled in your browser though.

这篇关于使用POST方法将参数发布到URL而不使用表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆