A tag specifies the URL, the implementation of the JS verification before the form submission

Source: Internet
Author: User

<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><title>Beginner's Tutorial (runoob.com)</title><Scripttype= "Text/javascript">    functionSave () {alert ("block A-tagged href request submission 1"); <!--This only simulates the verification process before the form is submitted, and the real JS verification code can be written in the Save () method -    }</Script></Head><Body>    <P>Click on the link below to view the results:</P><a href= "javascript:void (0)"   onclick  = "Save ()">Point me to submit a request!</a></Body></HTML>

The second way:

1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <MetaCharSet= "Utf-8">5 <title>Beginner's Tutorial (runoob.com)</title>6 <Scripttype= "Text/javascript">7     function Save (){8 Alert ("block A-tagged href request submission");9     <!--This only simulates the verification process before the form is submitted, and the real JS verification code can be written in the Save () method -Ten     } One </Script> A </Head> - <Body> -      the <P>Click on the link below to view the results:</P> - <ahref= "javascript:void (Save ())">Point me to submit a request!</a> - </Body> - </HTML>

A tag specifies the URL, the implementation of the JS verification before the form submission

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.