Home > Web Front-end > JS Tutorial > body text

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

WBOY
Release: 2016-05-16 16:35:45
Original
1485 people have browsed it

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"; 
}
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template