Changing a checkbox's state programmatically in dashcode

前端 未结 8 1489
一个人的身影
一个人的身影 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:25

    checkbox.setAttribute("checked", "checked"); // set
    checkBox.removeAttribute("checked"); // remove
    

提交回复
热议问题