Changing a checkbox's state programmatically in dashcode

前端 未结 8 1621
长发绾君心
长发绾君心 2021-02-15 01:28

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:08

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

    there is a problem with this line, it should be

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

提交回复
热议问题