Home >Web Front-end >JS Tutorial >How to judge whether there is what you want when multiple checkboxes are selected_javascript skills
When I was working on a project today, I encountered a problem. After the checkbox is selected, the selected value will be assigned to a variable. Based on the value of this variable, it is controlled whether a button on the page is displayed.
var temp = ""; for(){ var bool = ""; //给temp赋值 if(temp == '31'){ bool += "false"; } } if(bool.indexOf("false") >= 0){ document.getElementById("myid").style.display="none"; }else{ document.getElementById("myid").style.display="inline"; }