Jquery Knowledgebase: A simple JSON example1) External JSON fileOn the server in the same directory as your html file in part 2), named as "samplejson.js" : { 2) In the HTML or .Javascript filesWithin the Javascript (assuming that Jquery is present also the document is ready and there is a HTML tag with id="exampleid") function loadJson(){ 3) End resultThe HTML element with id="exampleid" will change to "Jones" when the function loadJson is run. |
Site content Copyright © 2001-2014 Galaxy Graphics Limited. | Privacy Policy | Terms of use |