JQuery Tool class function-url operation function

Source: Internet
Author: User

Called $. param a tool function that enables an object or array to be serialized in a format that is key/value often used to send a URL request to the server with the following format:

$. param (obj);

The parameter obj represents the object that needs to be serialized, and the object can be an array, and the entire function returns a serialized encoded string.

<body> <div id= "Divtest" > <div class= "title" > <span class= "FL" >url operation function </sp an> </div> <div class= "Content" > <div class= "Tip" ></div> </ div> </div> <script type= "Text/javascript" >        $(function () {            //Basic Information Object            varObjinfo =NewObject (); Objinfo.name= "Bai Fu Mei"; Objinfo.sex= 1; //Serializing Objects            varObjnewinfo =$.param (Objinfo); //Display the serialized object            varstrtmp = "<b> object white rich after serialization </b>:<br/><br/>"; Strtmp+=Objnewinfo; //Show in Page$ (". Tip"). Show (). append (strtmp);    }); </script></body>

Results:

object White Rich after serialization :

Name=%e7%99%bd%e5%af%8c%e7%be%8e&sex=1

JQuery Tool class function-url operation function

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.