分享

js按钮改成连接跳转

 小傅哥 2021-12-13
<html>

<head>

<title></title>
<script language="javascript" type="text/javascript">
    window.onload = function(){
        
        document.getElementById("buta").onclick = function(){
            location.href = "welcom.htm";
        }
    
    }
</script>
</head>

<body>
<input type="button" value="链接" id="buta"/>
</body>

</html>

    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多