后台代码获取窗口大小

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();

}

原文地址:https://www.cnblogs.com/kexb/p/4669739.html