Send both POST and GET in a form

前端 未结 5 1428
-上瘾入骨i
-上瘾入骨i 2020-12-15 10:08

I need to make a form send both POST and GET requests (due to some bugs in IE and iframes), how can you do so?

The data being sent is nothing mega secure so it doesn

5条回答
  •  悲哀的现实
    2020-12-15 10:39

    Not sure what bug you're trying to get around but you can use jQuery to easily modify the form's action to contain the posted values:

    script:

    function setAction() {
        $("#myform").attr("action", "/path/to/script/?" + $("#myform").serialize());
    }
    

    html:

提交回复
热议问题