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

首先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>

短信验证的原理

 

posted @ 2020-04-04 23:33  风意不止  阅读(221)  评论(0编辑  收藏  举报