ajax代码:
function getMsg() { var urlTemp = encodeURI($("#url").val()); $.ajax({ url: "Default.aspx", type: "POST", cache: false, data: "url=" + urlTemp, dataType: "json", success: function (result) { //log(result); if (result.status == 0) { alert(result.info); //$("#submit").attr("value", result.info); //$("#submit").attr("disabled", "disabled"); return; } }, error: function () { alert('fail'); } }); }
net后台代码:
string urlTemp = Request["url"].ToString();