Form plug-in--form

Source: Internet
Author: User

Form plug-in--form

Through form form plug-in, call ajaxForm() method, implement Ajax way to submit form data to the server, and through the options object in the method to get the server return data, the call format is as follows:

$(form). ajaxForm ({options})

Where the form parameter represents the form element name; Options is a configuration object that is used to send the AJAX request process to set the data and parameters to be sent.

1<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">234<title> forms plug-in </title>5<script type= "Text/javascript" src= "Http://www.imooc.com/data/jquery-1.8.2.min.js" ></script>6<script type= "Text/javascript" src= "Http://www.imooc.com/data/jquery.form.js" ></script>7<style>8 #divtest9             {Ten width:282px; One             } A #divtest. Title -             { - padding:8px; thebackground-Color:blue; - color: #fff; - height:23px; -line-height:23px; +font-size:15px; -font-Weight:bold; +             } A #divtest. Content at             { - padding:8px 0px; -background-color: #fff; -font-size:13px; -             } - #divtest. Content. Tip in             { -text-Align:center; to border:solid 1px #ccc; +background-color: #eee; - margin:20px 0px; the padding:8px; *             } $ . FLPanax Notoginseng             { -                 float: Left; the             } + . Fr A             { the                 float: Right; +             }         -</style> $ $      -<body> -<form id= "FRMV" method= "Post" action= "#" > the<div id= "Divtest" > -<div class= "title" >Wuyi<span class= "FL" > Personal Information page </span> the<span class= "FR" > -<input id= "btnsubmit" type= "Submit" value= "Commit"/> Wu</span> -</div> About<div class= "Content" > $<span class= "FL" > User name: </span><br/> -<input id= "user" name= "user" type= "text"/><br/> -<span class= "FL" > Nickname: </span><br/> -<input id= "Nick" Name= "Nick" type= "text"/> A<div class= "Tip" ></div> +</div> the</div> -</form> $          the<script type= "Text/javascript" > the$(function () { the                 varOptions = { theURL: "9-2.php",  -Target: ". Tip" in                 } the$ ("#frmV"). Ajaxform (options); the             }); About</script> the</body> theView Code
1 <? PHP 2 $user = $_post[' user ']; 3 $nick = $_post[' Nick ']; 4 echo "User name:" $user. " Nickname: ". $nick;
View Code

Form plug-in--form

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.