码迷,mamicode.com
首页 > Web开发 > 详细

登录注册时候的,短信验证如何做?JS获取当前时间

时间:2020-04-05 00:14:59      阅读:81      评论:0      收藏:0      [点我收藏+]

标签:document   fun   java   eth   win   class   onload   function   style   

首先JS获取当前时间

 <script type="text/javascript">  
 window.onload = function(){  
 var nowDate = new Date();  
 var str = nowDate.getFullYear()+"-"+(nowDate.getMonth() + 1)+"-"+nowDate.getDate()+" "+nowDate.getHours()+":"+nowDate.getMinutes()+":"+nowDate.getSeconds();  
 document.getElementById("shijian").value=str;  
 }  
 </script>

短信验证的原理

 

登录注册时候的,短信验证如何做?JS获取当前时间

标签:document   fun   java   eth   win   class   onload   function   style   

原文地址:https://www.cnblogs.com/cn-oldboy/p/12635189.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!