Html页面跳转

1.html页面简单调转的几种方式

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>html页面调转方式</title>
</head>

<script type="text/javascript">

    //通过location
    function fun() {

        window.location.href = "a.html";
        //  window.location = "a.html";//也可以调转

    }

    function fun2() {

        window.location.reload();
    }

    function fun3(){

        window.open("a.html");
    }


</script>
<body>


<fieldset>
    <legend>html页面调转方式</legend>

    <input type="button" onclick="fun()" value="跳转到a.html">&nbsp;&nbsp;

    <!--通过超链接方式-->
    <a href="a.html">跳转到a.html</a>&nbsp;&nbsp;

    <!--刷新-->

    <input type="button" onclick="fun2()" value="重新加载b.html"><br><br>

    <!--新建窗口指向a.html,不能返回-->
    <input type="button" onclick="fun3()" value="创建a.html窗口" ><br><br><br>

    <!--form表单方式-->

    <form action="a.html" method="post">
        <input type="submit" value="到a.html"/>
    </form>


</fieldset>

</body>
</html>

2.界面效果如下

a.文档结构图

这里写图片描述

b.b.html

这里写图片描述

c.a.html

这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值