Output (getElementById) in Javascript
Output (getElementById) The last method is the most powerful and the most complex (but don't worry, it's really easy!). Everything on a web page resides in a box. A paragraph () is a box. When you mark something as bold you create a little box around that text that will contain bold text. You can give each and every box in HTML a unique identifier (an ID), and Javascript can find boxes you have labeled and let you manipulate them. Well enough verbiage, check out the code! <html> <head> </head> <body> <div id='feedback'></div> <script type='text/javascript'> document.getElementById('feedback').innerHTML='Hello World!'; </script> </body> </html> The page is a little bigger now but it's a lot more powerful and scalable than the other two. Here we defined a division an...