jokerspace

页面控制代码(二) 打开固定的页面

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>打开新页面</title>
    <script type="text/javascript">
    window.onload=function(){
        var e=e||event;
        var openNewPage=function(e){
            e.onclick=function(){
                window.location.href=this.getAttribute(\'data_href\');
                /*
                    window.open(\'目标页面\');
                    window.history.back(-1);

                    window.location.replace(\'目标页面\');
                */

            }
        }
        openNewPage(document.getElementById("openNewPage"));
    };

    </script>
</head>
<body>
    <input type="button" data_href=\'http://www.baidu.com\' id=\'openNewPage\' value="dakai"/>
</body>
</html>

断了一段时间的wifi,全拿去研究基础的控制代码了。。。。。

posted on 2016-08-06 14:19  jokermarvelous  阅读(131)  评论(0编辑  收藏  举报
 

分类:

技术点:

相关文章: