我已经尝试了几个小时找到这个问题的解决方案,但以下代码根本不适用于Internet Explorer 11.它适用于Chrome和Firefox.使用IE11时,提交帖子但提交的表格为空.
<!DOCTYPE html> <html> <head> <Meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script> </head> <body> <form action="/Mandate/Edit" id="mandateForm" method="post"> <input id="ExternalId" name="ExternalId" type="hidden" value="" /> <input id="mandateName" name="mandateName" type="text" /> <a href="#" id="md-submit">Create</a> </form> <script type="text/javascript"> $(function () { $("#md-submit").on("click",function (e) { e.preventDefault(); var form = $("#mandateForm"); var request = $.ajax({ type: "POST",url: form.attr("action"),data: { mandateName: "test4711" },dataType: 'json',cache: false }); }); }); </script> </body> </html>
非常感谢您的帮助.