Javascript examples for DOM:Key Event
Push and reference key value pair using javascript
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w w w . j av a2s.com var time = { "timetable": { "MONDAY": { "my0": {}, "my1": {}, "my2": {}, "my3": {}, "my4": {} } } } for(var i=0;i<5;i++) time.timetable.MONDAY["my"+i] = {} } </script> </head> <body> </body> </html>