Heim > Fragen und Antworten > Hauptteil
<div class="formControls col-xs-8 col-xs-offset-3"> <input name="captcha" class="input-text size-L" type="text" placeholder="验证码" onblur="if(this.value==''){this.value='验证码:'}" onclick="if(this.value=='验证码:'){this.value=';}" value="" style="width:150px;"> <img src="{:captcha_src()}" id="captcha_img"> <a id="kanbuq" href="javascript:captcha_refresh();">看不清,换一张</a></div>
<script> function captcha_refresh(){ var str = Date.parse(new Date())/1000; $("#captcha_img").attr("src" , "/captcha?id="+str); }</script>