Blogger Information
Blog 1
fans 0
comment 0
visits 976
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Javascript模拟注册成功跳转页面(大致的样子)
Qin__yi
Original
977 people have browsed it
//注:该代码核心来自JS教程黑马程序员JavaScript中,不善之处,请谅解。嘿嘿。本人小白一枚,欢迎交流。
//写在这里也就当笔记使用了,都懂128G内存的痛  ———__———!
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>TEST</title>
</head>
<body>
    <input type="button" value="Cick" onclick="change()" id="d1">
    <script>
        var getid=document.getElementById("d1");
        getid.onclick=function(){
            alert("注册成功,5秒后自动跳转页面至首页");
            document.write("页面将在"+"<span id='d2'>"+"5"+"</span>"+"秒后跳转"+"<br  />");
            document.write("如果没有跳转,请点击下面链接手动跳转");
            document.write("<a href='http://www.baidu.com'>"+"<br  />"+"手动跳转"+"</a>")
            setInterval("timeout()",1000);
            setTimeout("change()",5000);
        }
        function change(){
            location.replace("http://www.baidu.com");
        }
        function timeout(){
            var interval=document.getElementById("d2");
            var arr=interval.innerHTML;
            interval.innerHTML=arr-1;   
        }
    </script>
</body>
</html>


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post