V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
w516322644

那个今天突然间发现,搜狗浏览器,对 remove 这种定义方法会直接删除该元素。。那 js 中还有其他这样的坑吗。

  •  
  •   w516322644 · Jun 20, 2017 · 3363 views
    This topic created in 3233 days ago, the information mentioned may be changed or developed.
    如题。。。
    6 replies    2017-06-24 13:58:44 +08:00
    scgy5555
        2
    scgy5555  
       Jun 21, 2017
    不然呢?什么浏览器不直接删除该元素?
    w516322644
        3
    w516322644  
    OP
       Jun 21, 2017
    @scgy5555 我用的火狐没有。。。
    w516322644
        4
    w516322644  
    OP
       Jun 21, 2017
    不过我是加了个参数。。。。
    w516322644
        5
    w516322644  
    OP
       Jun 21, 2017
    我又试了下,在 onclick ="remove()" 火狐和 google 都会报 remove 未定义。
    8qwe24657913
        6
    8qwe24657913  
       Jun 24, 2017
    @w516322644 #5 看#1,在 with 语句 中 remove() 方法是不可见的,onclick 用的就是 with
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5672 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 08:58 · PVG 16:58 · LAX 01:58 · JFK 04:58
    ♥ Do have faith in what you're doing.