Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <!--
- -->
- <html>
- <head>
- <title>First Web Page</title>
- <style>
- body { background-color: firebrick;
- color: white;}
- div { background-color: blue;
- border: 5px solid yellow;
- margin: 50px;
- padding: 10px;}
- </style>
- <script>
- function test(){
- var el = document.getElementById("text1");
- el.value = "this is not a test";
- var el2 = document.getElementById("textBox1");
- var output = document.getElementById("output");
- var g = [1,2,3,4,"text",5,6,7,8];
- //JSON = java script object notation
- // [] means array, {} means object
- var obj = {Name:"Tom", Age:20};
- output.innerHTML="Hello <br>" + g.join("<br>") + "<br>" + JSON.stringify(obj);
- }
- </script>
- </head>
- <body>
- <h2>This is a web page</h2>
- <div> div stands for division.
- A div is a block element
- </div>
- <input type="text" value="Enter Your Name" id="textBox1"/>
- <input type="button" value="Testing"
- onClick="test()"/>
- <textarea cols="20" rows="3" id="text1">
- this is a text area more than one line of text
- </textarea>
- <div id="output"></div>
- </body>
- </html>
- <!-- this is a comment -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement