JS的一些简单应用 —— 前进后退效果

点击按钮有前进后退效果

<!DOCTYPE html>
<html lang="en">

<script>
    console.log(window.history);
    //在地址栏加上?id=数字,会发现控制台的长度变化
    console.log(window.screen.width);
    console.log(window.screen.height);
    alert(window.document);                         
</script>


    <head>
        <meta charset="utf-8">
    </head>
    <body>
         <input type="button" value="前进" onclick="javascript:window.history.forward();" />

         <input type="button" value="后退" onclick="javascript:window.history.back();" />
    </body>
</html>

猜你喜欢

转载自blog.csdn.net/dyw_666666/article/details/80345279