??? ???? ?? ?? ??? ???? ???? ??
?? ???? ??? ????? ??? ??? ????, ????? php ??? ??? ?? ??????. captcha.php
?? ???? ??? ???? ??? ?? ???????.
?? ????? ?????.
login.html ??? ??? ??? ????.
<div class="form-group"> <div class="field"> <input type="text" class="input input-big" name="code" placeholder="填寫右側(cè)的驗證碼" data-validate="required:請?zhí)顚懹覀?cè)的驗證碼" /> <img src="images/passcode.jpg" alt="" width="100" height="32" class="passcode" style="height:43px;cursor:pointer;" onclick="this.src=this.src+'?'"> </div> </div>
??? ? ??? ?? ???? ?? ?? ??? ???? ???. ??? ??? ??? ????
<div class="form-group"> <div class="field"> <input type="text" class="input input-big" name="code" placeholder="填寫驗證碼" data-validate="required:請?zhí)铗炞C碼" /> <a style="float:right; padding:5px;" href="javascript:;" onclick="document.getElementById('captcha_img').src='captcha.php?r='+Math.random()"> <img id="captcha_img" class="passcode" border='1' src='captcha.php?r=echo rand(); ?>' style="width:100px; height:42px" /> </a> </div> </div>
?? ?? ? ??? ????. CSS ??? ??. ???? javascript? HTML DOM Document ??? ????, captcha.php? ????? ??? ???? ?????.
?? ?? ? ?? ??: