Created
March 25, 2014 06:14
-
-
Save killinterpol/9756090 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <input type="text" id="id"/> | |
| <input type="text" id="name"/> | |
| <input type="text" id="desc"/> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var data = { "id" : "123", "name" : "ObjectName", "desc" : "description"}; | |
| $(document).ready( function() { | |
| $.map(data, function (prop, i) { | |
| console.log(i); | |
| $("#"+i).val(prop); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment