jquery solutions to post to another site from static html page

你说的曾经没有我的故事 提交于 2019-12-05 13:13:31

You could try using JSONP as an alternative method. A quick overview of JSONP can be found on wikipedia (http://en.wikipedia.org/wiki/JSON#JSONP). jQuery implements JSONP support through the .getJSON method (http://docs.jquery.com/Ajax/jQuery.getJSON).

Unfortunately, to use JSONP you need to submit the form data as a query string (GET request, instead of a POST request). You can serialize a form into a query string using jquery's serialize method (http://docs.jquery.com/Ajax/serialize).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!