tzoffset.php
来自「网页打卡钟系统,源码提供给大家学习一下啦!希望给大家带来帮助」· PHP 代码 · 共 31 行
PHP
31 行
<script language="JavaScript"> var time = new Date() var cookieexpire = new Date(time.getTime() + 90 * 24 * 60 * 60 * 1000); //cookie expires in 90 days var timeclock = document.cookie; var timezone = (-(time.getTimezoneOffset())) function getthecookie(name) { var index = timeclock.indexOf(name + "="); if (index == -1) return null; index = timeclock.indexOf("=", index) + 1; var endstr = timeclock.indexOf(";", index); if (endstr == -1) endstr = timeclock.length; return unescape(timeclock.substring(index, endstr)); } function setthecookie(timeclock, value) { if (value != null && value != "") document.cookie=timeclock + "=" + escape(value) + "; expires=" + cookieexpire.toGMTString(); timeclock = document.cookie; } var tzoffset = getthecookie("tzoffset") || timezone; if (tzoffset == null || tzoffset == "") tzoffset="0"; setthecookie("tzoffset", tzoffset);</script>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?