//后台cs代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Login_jg : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
public string get()
{
string name=this.Request["name"]; // 从另一页获取参数,可以不需要!
string json = "{Name:'" + name + "',Number:'"15"' + "'}";
return json;
}
}
var dpinfo = "<%=get() %>";
var dpjson = eval("(" + dpinfo + ")");
alert(dpjson.Name);