Changing a checkbox's state programmatically in dashcode

前端 未结 8 1468
一个人的身影
一个人的身影 2021-02-15 01:22

Okay, so I\'m trying to change a checkbox\'s state programmatically in dashcode. I\'ve tried:

var checkbox = document.getElementById(\"checkbox\");

// I have tr         


        
8条回答
  •  说谎
    说谎 (楼主)
    2021-02-15 02:00

    var checkbox = document.getElementById("checkbox"); 
    

    there is a problem with this line, it should be

    var checkbox = document.getElementById('#checkbox");
    

提交回复
热议问题