jquery Print JSON Format object Instance code:
The so-called JSON format object is actually the object direct volume, many tutorials say this is the JSON object, in fact this is not correct.
Here is an example of a printed JSON format object, which I hope will help beginners.
The code is as follows:
<!DOCTYPE HTML> <HTML> <Head> <MetaCharSet= "Utf-8"> <Metaname= "Author"content= "http://www.softwhy.com/" /> <title>Ant Tribe</title> <Scripttype= "Text/javascript"src= "Mytest/jquery/jquery-1.8.3.js"></Script> <Scriptlanguage= "JavaScript"> functionHandler (event) {varStr=""; STR=Str+"{"; for(varIinchevent.data) {str=Str+I+":" +Event.data[i]+","; } STR=str.substring (0, Str.length-1); STR=Str+"}"; alert (str); } $ (document). Ready (function(){ $("#bt"). Bind ("Click", {webName:"Ant Tribe", Address:"Shinan District, Qingdao"},handler)})</Script> </Head> <Body> <inputtype= "button"ID= "BT"value= "View Results"/> </Body> </HTML>
The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=10573
For more information, refer to: http://www.softwhy.com/jquery/
jquery Print JSON Format object Instance code