登录注册时候的,短信验证如何做?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>
短信验证的原理