innerHTML of body element : innerHTML « DOM Node « JavaScript Tutorial






<html>
    <head>
        <title></title>
        <script type="text/javascript">
            function useRanges() {
                alert(document.body.innerHTML);
                
            }
        </script>
    </head>
    <body><p id="p1"><b>Hello</b> World</p>
        <input type="button" value="Use Ranges" onclick="useRanges()" />      
     
  
    </body>
</html>








23.11.innerHTML
23.11.1.Get element by id and change the innerHTML
23.11.2.Change hyperlink innerHTML
23.11.3.Change InnerHTML
23.11.4.innerHTML of body element