Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Document</title>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
- <script>
- // http://labs.myn.com.br/2012/12/json-cidades-e-estados-brasileiros.html
- $(function(){
- $.ajax({
- dataType: "json", // define o tipo de arquivo
- url: 'estados.json', // arquivo contendo os dados do json
- success: function(e){ // quando o arquivo terminar de fazer download executa essa função
- console.log(e.estados[0].sigla);
- console.log(e.estados[0].nome);
- }
- });
- });
- </script>
- </head>
- <body>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement