Possible Duplicate:
07000
我在asp.net 4.0中有应用程序
我有javascript将客户区偏移显示到文本框中: –
`
<script type="text/javascript"> function GetTimeZoneOffset() { var d = new Date() var gmtOffSet = -d.getTimezoneOffset(); var gmtHours = Math.floor(gmtOffSet / 60); var GMTMin = Math.abs(gmtOffSet % 60); var dot = "."; var retVal = "" + gmtHours + dot + GMTMin; document.getElementById('<%= offSet.ClientID%>').value = retVal; } </script>
`
Html MarkUp
<asp:HiddenField ID="clientDateTime" runat="server" /> <asp:HiddenField ID="offSet" runat="server" /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></body>