后台代码获取窗口大小

if (Request["_method"] == "queryScreenSize")
{
string h = SystemInformation.WorkingArea.Height.ToString();
string w = SystemInformation.WorkingArea.Width.ToString();
var screen = new {Width = w, Height = h};
Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(screen));
Response.End();

}

posted on 2015-07-23 10:43  听哥哥的话  阅读(183)  评论(0编辑  收藏  举报

导航