javascript getElementsByClassName() always returns none?

前端 未结 3 681
慢半拍i
慢半拍i 2020-12-10 16:12

I want to create the simplest bookmarklet for my browser.

javascript:document.getElementsByClassName(\'source\').style.visibility=\'visible\';
<
3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-10 16:55

    There is 'visibility' and there is 'display'. They are quite different beasts.

    W3Schools:

    visibility

    display

提交回复
热议问题