日期:2014-05-17 浏览次数:20655 次
if (dataType == "SearchCustomer")
{
int ID;
if (Int32.TryParse(CustomerID, out ID))
{
string s = GridComputer.GridCustomer.getCustomer(1, 1, ID);
if (s == null)
{
context.Response.ContentType = "text/plain";
context.Response.Write("[{\"name\":无用户,\"id\":\"0\",\"company\":\"无用户\"}]");
}
else { context.Response.Write(s); }
}
}
$(document).ready(function () {
$("#Button3").click(
function (SucCallback) {
$.ajax(
{
type: "get",
url: 'GridDatas.ashx', //后台处理程序
dataType: 'json', //接受数据格式
data: 'DataType=SearchCustomer&CustomerID=' + document.getElementById("Text3").value, //要传递的数据
success:SucCallback,
error: function () { alert("error"); }
&