Request取值有关问题

Request取值问题
<head runat="server">
  <title></title>
</head>
<body>
  <input id="ScrWidth" runat="server" type="text" />
  <script language="JavaScript">
  var strScreenWidth = window.screen.width;
  var strScreenHeight = window.screen.height;
  document.getElementById("ScrWidth").value= strScreenWidth;
  alert(strScreenWidth);  
  </script>
  <form id="form1" runat="server">
  <div>
   
  </div>
 
  </form>
</body>
</html>

在到台代码中得到的值为"";但alert(strScreenWidth); 可以有值
  protected void Page_Load(object sender, EventArgs e)
  {
  string strValue = ScrWidth.Value;
  strValue = Request.QueryString["ScrWidth"];
  string strHeigth = ScrWidth.Value;
   

  }


------解决方案--------------------
如果这是你的全部代码,那肯定是没值的。page_load方法在服务器端执行。JS在客户端执行,只有在服务器解析完毕之后把原始的HTML代码和JS代码发送的前台的时候才会去执行JS。
------解决方案--------------------
<input id="ScrWidth" runat="server" type="text" />

要放form里面才能 ScrWidth.Value;得到