当单击链接而不使用表单时,一起发送POST数据? [英] Send POST data along when link is clicked without using forms?

查看:134
本文介绍了当单击链接而不使用表单时,一起发送POST数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在页面上有一些常规的锚链接标签链接,它们打开一个弹出窗口,显示通过url传递的任何GET数据:

I have some regular anchor tag links on my page that open up a popup window which displays whatever GET data I pass through the url:

<a href="javascript:window.open('view.php?data=a%20bunch%20of%20data');">View</a>

这些数据中的一部分非常长,而且我的蹩脚网页主机的大小限制很小可以在url中传递的GET数据。有没有办法做到这一点与POST数据,而不使用HTML表单?

Some of this data is really long, and my crappy web host has a very small limit on the size of the GET data that can be passed in a url. Is there a way to do this with POST data instead, without using html forms?

推荐答案

你也可以使用 XMLHttpRequest

http://www.w3schools.com/xml/xml_http.asp

这篇关于当单击链接而不使用表单时,一起发送POST数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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