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

js 中 name 的属性是 string?

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

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

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