Home >Web Front-end >JS Tutorial >How to judge whether there is what you want when multiple checkboxes are selected_javascript skills

How to judge whether there is what you want when multiple checkboxes are selected_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:35:451504browse

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"; 
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn