Javascript examples for Language Basics:Introduction
Read and Modify the Property Values
<!DOCTYPE HTML> <html> <head> <title>Example</title> </head> <body> <script type="text/javascript"> var myData = {//from www .j a va 2 s .co m name: "java2s.com", topic: "CSS", }; myData.name = "Joe"; myData["topic"] = "raining"; document.writeln("Hello " + myData.name + "."); document.writeln("It is " + myData["topic"]); </script> </body> </html>