Edit D:\AVAWeike\AVAWeike\AVA.ResourcesPlatform.AdminUI\JS\JsonCookie\Demo.htm
??<!doctype html > <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title></title> <script type="text/javascript" src="../jquery-1.3.2.1.min.js"></script> <script type="text/javascript" src="jquery.cookie.js"></script> <script type="text/javascript" src="jquery.jsoncookie.js"></script> <script type="text/javascript" src="json2.js"></script> <script type="text/javascript"> function SetC1() { //?????ame,?????alue ?????xpires ??? $.cookie('c1', 123, { expires: 1 }); } function GetC1() { var c1 = $.cookie('c1'); alert(c1); } function SetJ1() { var j1 = '{ "id": 1, "name": "jerry", "pass": "1234" }'; j1 = JSON.parse(j1); alert(j1); alert(JSON.stringify(j1)); alert(j1.id); alert(j1.name); alert(j1.pass); //?????????????? JSON.stringify(j1) ???????????ookie $.JSONCookie("j1", j1, { path: '/', expires: 1 }); } function GetJ1() { var j1 = $.JSONCookie("j1"); // alert(j1.toJSONString()) alert(j1.id); alert(j1.name); alert(j1.pass); alert(JSON.stringify(j1)); } </script> </head> <body> jquery.cookie.js ?????ookie??<br /> jquery.jsoncookie.js ?????son??ookie?????<br /> json2.js ?????son?????<br /> <input type="button" value="???'ABC123'??ookie C1??" onclick="SetC1()" /> <input type="button" value="???Cookie C1??" onclick="GetC1()" /> <input type="button" value="???Json {id:1,name:'jerry',pass:'1234'}?? cookie j1" onclick="SetJ1()" /> <input type="button" value="???Cookie j1??" onclick="GetJ1()" /> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de