search

Home  >  Q&A  >  body text

Report an error

Teacher, I wrote the carousel image based on your code. Why did I get the error "Cannot set property 'onclick' of null"" when binding the click event of the carousel box?

P粉373939045P粉373939045712 days ago713

reply all(1)I'll reply

  • 普通收录

    普通收录2022-12-29 11:57:39

    Is the JS executed after the browser loads the button node first? Try loading the js at the bottom

    reply
    0
  • Cancelreply