Home > Web Front-end > JS Tutorial > Select the checkbox button to be grayed out otherwise the button is available_javascript skills

Select the checkbox button to be grayed out otherwise the button is available_javascript skills

WBOY
Release: 2016-05-16 16:47:10
Original
1883 people have browsed it
复制代码 代码如下:

<html> <br><head> <br><script> <br>function asd(){ <br>var reg=document.getElementsByName("reg"); <br>if(reg[0].checked){ <br>document.getElementById("submit").disabled=false; <br>} <br>else { <br>document.getElementById("submit").disabled=true; <br><br>} <br>} <br></script> <br><br></head> <br><body> <br><input name="reg" type="checkbox" onclick="asd();" />阅读了吗? <br><input type="submit" value="注册" id="submit" disabled/> <br></body> <br></html>




 
 
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