ajax post 后台方法无法获取字符串只能获取int类型
$.ajax({type: "post",
dataType: "json",
contentType: "application/json", //注意:WebMethod()必须加这项,否则客户端数据不会传到服务端
data: "{name:" + name + ",pass:" + pass + "}",
url: "PlatformLevelUserManagement/UserManagement.aspx/Search",//模拟web服务,提交到方法
// 可选的 async:false,阻塞的异步就是同步
//beforeSend:function(){
// // do something.
// // 一般是禁用按钮等防止用户重复提交
// $("#btnClick").attr({disabled:"disabled"});
// // 或者是显示loading图片
//},
success: function (data) {
var ships = eval('(' + data.d + ')');
var str = data.d;
$("#div_table table tbody").html("");
if (ships != null) {
if (ships.length) {
$("#div_table").show();
var trs = "";
for (var i = 0; i < ships.length; i++) {
trs += "<tr><td class='auto-style1'>" + ships[i].SuperUserIName + "</td><td>" + ships[i].SuperUserIPass + "</td><td>" + ships[i].Mobile + "</td><td>" + ships[i].IDCard + "</td><td>" + ships[i].Email + "</td><td><button id='sample_editable' class='blue_1' data-toggle='modal' data-target='#amendModal' onclick='show(this)' value='" + ships[i].SuperUserID + "'>修改 <i class='icon-pencil'></i></button><input name='ok' type='button' onclick='jsa();' class='blue ' id='ok' value='启用√'></td></tr>";
}
$("#div_table table tbody").append(trs);
}
}
},
error: function (data) {
alert("error: " + data.d);
}