Rectangle 27 0

javascript the code is running fine on the web, but why am i getting null error?


About Your javascript is executed before the DOM has been loaded., if you place the <script> right before </body> then the DOM is - technically - still not fully loaded at the time the document.getElementById('ii') is exectued. To DOM is still only partially loaded, but it contains the ii element because the <script> tag is placed after the element with the id ii.

Your javascript is executed before the DOM has been loaded. Put all <script>-Tags just before the closing </body> tag.

Note