1. Silly refresh
The so-called silly refresh is to add a hyperlink directly behind the verification code image. The hyperlink address is still on this page. The advantage is: the simplest way is to know at first glance.
No technical content. But not enough: refresh is equivalent to refreshing the entire page, which is the same as clicking the browser to refresh, And will clear the information you enter in the form.
The following two refresh methods will not clear the form information, which is a little troublesome. The third method is to refresh the common verification code on the webpage.
2. Click the verification code image to refresh
<Script type = "text/javascript">
Function change (img ){
Img. src = img. src + "? "+ New Date (). getTime ();
}
</Script>
<Input type = "text" name = "checkcode">
& Nbsp;
(you can't see clearly, click the verification code)
3. Click connection refresh next to the Verification Code
<Script type = "text/javascript">
Function change (){
Document. getElementById ("img"). src = "CheckCode? "+ Math. random ();
}
</Script>
<Input type = "text" name = "checkcode"> & nbsp;
& nbsp;
<A href = "javascript: change ();"> cannot see clearly. Click here </a> <br>
Explanation: src = "CheckCode? "+ Math. random (); the question mark next to this path is a random number, which has been refreshed. Img
Src = "CheckCode". Here, the CheckCode is the verification code class, and the above js script refreshes the code by obtaining the id. Therefore, the id here must exist and must not be omitted.
Of