<script type = "text/javaScript" language = "javaScript"> var wait = 60 ؛ تغيير الوظيفة () {$ o = $ ("#j_refresh_checkcode") ؛ if (انتظر == 0) {$ o.removeAttr ("تعطيل") ؛ $ O.HTML ("لا يمكن رؤية بوضوح؟ تغيير آخر") ؛ انتظر = 60 ؛ } آخر {$ o.attr ("معطل" ، صحيح) ؛ $ O.ATTR ("Font-Color" ، "Gray") ؛ $ O.HTML (انتظر + "يمكن إعادة الحصول عليها في ثوان") ؛ انتظر--؛ if (wait == 59) {var imgnode = document.getElementById ("vimg") ؛ imgnode.src = "../../ajaxserver/checkcodepic.ashx؟t=" + (New Date ()). valueof () ؛ // أضف معلمة زمنية هنا لمنع مشاكل التخزين المؤقت للمتصفح $ ("#j_checkcode_tip"). addClass ("Hide") ؛ $ ("#j_checkcode_tip> div"). html ("") ؛ $ ("#<٪ = hidpicmessage.clientid ٪>"). val ("") ؛ } setTimeOut (function () {change ()} ، 1000)}} </script>ثم HTML كما يلي:
<div> <span> رمز التحقق </span> <input name = "checkCode" id = "j_checkcode_input" onMousedOwn = "ClearCodeMessage ()" type = "text" maxLength = "6" AutoCOPETE = "OFF" onblur = ") id = "vimg" style = "float: left ؛ margin: -1px 0 0 0 3px"/> <a id = "j_refresh_checkcode" onClick = "Change ()"> </viv> </viv>