zoukankan      html  css  js  c++  java
  • JavaScript

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="utf-8" />
            <title>窗口与框架</title>
            <script type="text/javascript">
                window.onload=iniall;
                     function iniall(){
                         for(var i=0;i<document.links.length;i++){
                             document.links[i].onclick=setcotant;
                             document.links[i].thisPage=i+1;
                         }
                     }
                     function setcotant(){
                         var newtext="<h1>you are now....."+this.thisPage+"<h1>"
                         document.getElementById("icotant").contentWindow
                                 .document.body.innerHTML=newtext;
                         return false;
                     }
            </script>
            <style type="text/css">
                body{
                    background-color: #fff;
                    height: 2000px;
                }
                iframe#icotant{
                    position: fixed;
                    border: 2px solid black;
                     400px;
                    height: 400px;
                    margin:200px;
                }
            </style>
        </head>
        <body>
            <iframe src="new_file104.html" name="icotant" id="icotant" > </iframe>
            <h1>A realy important page </h1>
            <h3>
            <a href="new_file105d.html">link1</a><br />
            <a href="new_file104.html">link2</a><br />
            <a href="new_file105d.html">link3</a>
            </h3>
        </body>
    </html>

  • 相关阅读:
    PS总结
    有用的官方API和官网
    获取jQuery DataTables 的checked选中行
    jQuery DataTables 问题:Cannot reinitialise DataTable
    jQuery DataTables 分页
    实现页面跳转和重定向的几种方法
    iframe父页面和子页面高度自适应
    双核浏览器默认选择内核渲染自己开发的网页
    使用母版页的子页面无法显示母版页图片
    gdb安装
  • 原文地址:https://www.cnblogs.com/webph/p/5107632.html
Copyright © 2011-2022 走看看