window.open()没明白,小虎说的什么意思?

解决方案 »

  1.   

    描述:
    指定显示内容的窗口或者帧。语法:
    object.target[ = target]注释
    如果没有与指定的名称相匹配的窗口或者帧,浏览器将打开一个新窗口,以下部分不翻译The default value for target depends upon the URL and site. If the user does not leave the site, the default is _self, but if the user exits to a new site, the default is _top. Special Target Values _blank Specifies to load the link into a new blank window. This window is not named.  
    _parent Specifies to load the link into the immediate parent of the document the link is in.  
    _self Specifies to load the link into the same window the link was clicked in.  
    _top  Specifies to load the link into the full body of the window.  
    This property has read-write permissions, meaning you can change as well as retrieve its current value. 应用于下列html标签中A, AREA, BASE, FORM 
      

  2.   

    <a href="http://www.google.com" id="aaa">aaaa</a>
    <a href="http://www.google.com" id="bbb">bbbb</a>
    <script>
    document.getElementById("bbb").target = "_blank";
    </script>
      

  3.   

    <a href="http://www.google.com" id="aaa">aaaa</a>
    <a href="http://www.google.com" id="bbb">bbbb</a>
    <script>
    document.getElementById("bbb").target = "_blank";
    </script>
    这里的document.getElementById("bbb").target = "_blank";我可以随便指定吗?还是“_blank”应该是某个页面的title或者拿个属性?