- 这是一个form表单实例
- <form id ="fm" method="post" action="/SearchInfo/QueryMoreInfo" >
- <div>
- <table id="searchInfo" style=" auto; height:auto; margin: 8px" title="基本信息" iconcls="icon-edit">
- </table>
- <input id ="setGuid" name="setGuid" type="hidden">
- </div>
- </form>
- 以下为运用ajax的代码:
- $.ajax({
- type: "POST",
- url:"SearchInfo/QueryMoreInfo",
- data:$('#fm').serialize(),// 序列化表单值
- async: false,
- error: function(request) {
- alert("Connection error");
- },
- success: function(data) {
- window.location.href="跳转页面"
- }
- });