jQuery读取JSON文件内容的例子

 

Json.html文件:



 
  
  Json Document
  
  
 
 
  

Get Json Document

  

 

b.json文件:

/*
 * JSON File
 * Website:http://www.supersha.cn
 *autoor:沙锋
 * This comment may need to be removed for proper parsing
 */
[
 {
 "term":"BACCHUS",
 "part":"n.",
 "definition":"A convenient deity invented by the ancients as an excuse for getting drunk.",
 "quote":[
 "Is public worship,then,a sin.",
 "That for devotions paid to Bacchus",
 "The lictors dare to run us in.",
 "And resolutely thump and whack us?"
 ],
 "author":"Jorace"
 },
 {
 "term":"BACKBITE",
 "part":"v.t.",
 "definition":"To speak of a man as you find him when he can t find you."
 },
 {
 "term":"BEARD",
 "part":"n.",
 "definition":"The hair that is commonly cut off by those who justly execrate the absurd Chinese custom of shaving the bead."
 }
]

你可能感兴趣的:(javascript)