js定时刷新页面.

        //页面定时刷新.2017.09.27
         $(document).ready(function () {
             self.setInterval(function () {
                 var d = new Date();
                 var t = d.toLocaleTimeString();
                 document.getElementById("bname").value = t;
             }, 1000);
         })

2:

      //页面定时刷新.2017.09.27
         $(document).ready(function () {
             self.setInterval("startclock", 1000);
         })
         function startclock() {
             var d = new Date();
             var t = d.toLocaleTimeString();
             document.getElementById("bname").value = t;
         }

 

posted @ 2017-09-27 11:07  longdb  阅读(2626)  评论(0编辑  收藏  举报