Change/Get check state of CheckBox

前端 未结 11 927
别跟我提以往
别跟我提以往 2020-12-03 02:30

I just want to get/change value of CheckBox with JavaScript. Not that I cannot use jQuery for this. I\'ve tried something like this but it won\'t work.

JavaScript fu

11条回答
  •  無奈伤痛
    2020-12-03 02:48

    This is an example of how I use this kind of thing:

    HTML :

    
    

    JAVASCRIPT :

    function ThisIsTheFunction(temp,temp2) {
      if(temp2 == true) {
        document.getElementById(temp).style.visibility = "visible";
      } else {
        document.getElementById(temp).style.visibility = "hidden";
      }
    }
    

提交回复
热议问题