document.body is null

前端 未结 1 889
情歌与酒
情歌与酒 2021-01-25 17:34

I\'ve got a page where I\'m using Mootools 1.2.4 and MediaboxAdvanced as a lightbox. I can\'t seem to get the thing working because of a particular javascript error

1条回答
  •  無奈伤痛
    2021-01-25 18:34

    You may only be able to use $ on an element returned from getElementById. A simple workaround is to instead use $$.

    $$('body')[0].adopt...
    

    0 讨论(0)
提交回复
热议问题