如果选中复选框,如何检查?
<script type=text/javascript> function validate(){ if (remember.checked == 1){ alert("checked") ; } else { alert("You didn't check it! Let me check it for you.") } }</script><input id="remember" name="remember" type="checkbox" onclick="validate()" />
<DIV data-role="content" data-theme="g"> <DIV class=ui-grid-g-login> <FORM method=post action=[$=PROBE(266)/] data-theme="C"> <P>~DATA_ERROR~</P> <div id="mail" data-role="fieldcontain"> <label for="mail">Email:*</label> <input id="mail" name="mail" type="email" /> </div> <div id="pass" data-role="fieldcontain"> <label for="pass">Paswoord:*</label> <input id="pass" name="pass" type="password" /> </div> <div id="remember" data-role="fieldcontain"> <label for="remember">Onthoud mij</label> <input id="remember" name="remember" type="checkbox" onclick="validate()" /> </div> <P><INPUT class=btn name=submit value=Login type=submit onclick="validate()"></P> </FORM> </DIV></DIV><!-- /content --><script type=text/javascript>function validate(){ var remember = document.getElementById('remember'); if (remember.checked){ alert("checked") ; }else{ alert("You didn't check it! Let me check it for you.") }}</script>
长风秋雁
慕盖茨4494581
慕沐林林
相关分类