Here is the code!
01 | <!DOCTYPE html> |
02 | <html> |
03 | <head> |
04 | <script type= "text/javascript" > |
05 |
06 | function test() |
07 | { |
08 | var obj = document.getElementById( "p1" ); |
09 | obj.innerHTML = obj.innerHTML + "<br/> howdy!" ; |
10 | } |
11 |
12 | </script> |
13 |
14 | </head> |
15 | <body> |
16 | <p id= "p1" >HEllo world</p> |
17 | <input type= "button" onclick= "test()" value= "Click me!" /> |
18 | </body> |
19 | </html> |