<script type="text/javascript" src="../../js/jquery/jquery.1.3.2.js"></script>
$(document).ready(function() {
$(function() {
$.getJSON("GetSipInfo.aspx", function(json) {
alert("姓名:" + json.seatNum);
});
});
});
GetSipInfo.aspx.cs:
public partial class manage_XC_Customer_GetSipInfo : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Clear();
Response.ContentEncoding = Encoding.UTF8;
Response.ContentType = "application/json"; //返回给前台是JSON数据
Response.Write("{\"seatNum\":\"9100\",\"password\":\"tldl9100\"}");
Response.Flush();
Response.End();
}
}