问答详情
源自:-

求救,怎么回事?

window.onload = function () {

  //获取鼠标滑过或点击的标签和要切换内容的元素

  var titles = $('notice-tit').getElementsByTagName('li');

  var divs = $('notice-con').querySelectorAll('div');

  alert(titles.length)

}

bug这是啥意思?

script.js:9 Uncaught TypeError: Cannot read property 'querySelectorAll' of null

    at window.onload (script.js:9)


提问者:慕粉7054916 2020-04-22 14:02

个回答