我想从其他网站启用表单发布。假设我在我的网站中有一个表单,并且希望为其他网站启用该表单发布。从其他网站发布表单(跨域和跨网页服务器)
我有asp.net网页www.xyx.com \ formpost.aspx 与字段EMail.and我想启用我的页面表单post.for所有谁发布数据到我的网站。 like
1)www.test.com \ emailpost.php表单从这个网站发布。
var str = JSON.stringify($('#myForm').serializeObject());
$.ajax({
type: 'POST',
contentType: 'application/json; charset=utf-16',
dataType: 'json',
url: "www.xyx.com/formpost.aspx/SaveCustomerEmail",
success: function (msg) {
alert('done');
},
error: function (msg) {
alert(JSON.stringify(msg)) }
});
2)www.test2.com \ emailpost.jsp从本网站发表邮件。
var str = JSON.stringify($('#myForm').serializeObject());
$.ajax({
type: 'POST',
contentType: 'application/json; charset=utf-16',
dataType: 'json',
url: "www.xyx.com/formpost.aspx/SaveCustomerEmail",
success: function (msg) {
alert('done');
},
error: function (msg) {
alert(JSON.stringify(msg)) }
});