Verify Code Refresh Problem

Source: Internet
Author: User

1. Fool-Type Refresh
The so-called fool-like refresh is, directly in the verification code picture after adding a hyperlink, the hyperlink address or this page, the advantage is: The simplest way, a look at the know is

What do you mean, no technical content. But not enough: this refresh is equivalent to refreshing the entire page, which is the same as the effect of clicking on the browser refresh, and emptying the information you fill in the form.
The following two kinds of refresh does not clear the form information, is a bit of trouble, the Web page commonly used to refresh the code is the third type.

2. Click the Verification code picture Refresh

<script type= "Text/javascript" >
function Change (IMG) {
IMG.SRC = Img.src + "?" + new Date (). GetTime ();
}
</script>

<input type= "text" name= "Checkcode" >
&nbsp;&nbsp;&nbsp;
(see not clear, click the Verification Code)

3. Click on the connection after the verification code refresh

<script type= "Text/javascript" >
function Change () {
document.getElementById ("img"). src = "Checkcode" + math.random ();
}
</script>

<input type= "text" name= "Checkcode" >&nbsp;&nbsp;
&nbsp;&nbsp;
<a href= "Javascript:change ();" > can not see Clearly, Dot here </a><br><br>

Detailed: src = "Checkcode?" + math.random (); The question mark at the back is the meaning of the ginseng, that is, let this path follow a random number, has reached the effect of refreshing. Img

Src= "Checkcode", where the Checkcode is written to verify the code class, the JS script above is through the way to get the ID to refresh, so here's ID must have, must not omit

Of

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.