开发者

request parameter using jquery/javascript

开发者 https://www.devze.com 2022-12-25 07:00 出处:网络
is it possible to stop the submission of a form,after submit button has been c开发者_JS百科licked and get the action attribute and the request parameters of the submission using javascript(preferably

is it possible to stop the submission of a form,after submit button has been c开发者_JS百科licked and get the action attribute and the request parameters of the submission using javascript(preferably jQuery) ? I want to get the action and the parameter so that the it can be submitted to an alternate location ,what i am tryin to do is try writing a proxy website.


Can't you just concatenate the form's action with a serialization of the form's data, e.g.:

$('form').submit(function() {
  alert($(this).attr("action") + $(this).serialize());
  return false;
});
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号