ev
JSON:http://www.json.org/
ev
ev
舉例說明
var bar = 'bar';
var foobar = eval('"foo" + bar');
alert(foobar);
var bar = 'bar';
// if variable bar equals 'bar', foobar is the result of
// last executing statement: bar="foo-bar";
var foobar = eval('if(bar == "bar") {bar="foo-bar";} else {bar = "bar-foo";}');
alert(foobar);// change the valuebar = 'foo';
// now our the last executed statement is: bar = "bar-foo";
// therefore the value of variable foobar has been changed
// into 'bar-foo'
foobar = eval('if(bar == "bar") {bar="foo-bar";} else {bar = "bar-foo";}');
alert(foobar);
JSON的格式
JSON的格式是由大括號和由冒號(:)構成的名值對所組成的。注意JSON格式與對象字面量 (object literals) 的區別:JSON的名字部分嚴格用引號+名字來表示。
新聞熱點
疑難解答
圖片精選