Javascript examples for DOM:Element innerHTML
Changing contents of an element via innerHTML
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/* w w w . jav a 2s . c o m*/ var array = ['This is where', 'the text will go']; document.getElementById('current_feed').innerHTML = array[0]; }); </script> </head> <body> <label id="current_feed"> "The commentary will appear here." </label> </body> </html>