• 请不要在回答技术问题时复制粘贴 AI 生成的内容
yantianqi
V2EX  ›  程序员

js 中 name 的属性是 string?

  •  
  •   yantianqi · Oct 25, 2016 · 2890 views
    This topic created in 3574 days ago, the information mentioned may be changed or developed.

    为什么?还有没有类似的变量

    4 replies    2016-10-25 23:13:45 +08:00
    yesmeck
        1
    yesmeck  
       Oct 25, 2016
    `window.name` 属于 BOM
    paragon
        2
    paragon  
       Oct 25, 2016
    @yesmeck 是 BOM 还是 BOOM 啊? 逃……
    gonelove
        3
    gonelove  
       Oct 25, 2016 via iPhone
    属性都是字符串
    ccloli
        4
    ccloli  
       Oct 25, 2016
    @paragon 如果是浏览器的话,顶级作用域 window 有个 name ,如果非局部变量的话, name 指向的就是 window.name 了。它属于 BOM ( Browser Object Model )的范围,表明当前页面的名称。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3017 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 03:22 · PVG 11:22 · LAX 20:22 · JFK 23:22
    ♥ Do have faith in what you're doing.