html - My JavaScript code is not working in visual studio code -


<!doctype html> <html> <body>  <h2>my first web page</h2> <p>my first paragraph.</p>  <p id="demo"></p>  <script> document.getelementbyid("demo").innerhtml = 5 + 6; </script>  </body> </html>  

this basic javascript program taken w3schools.com.the following program has return 11(5+6).but returning first webpage , first paragraph.

<!doctype html>  <html>  <body>    <h2>my first web page</h2>  <p>my first paragraph.</p>    <p id="demo"></p>    <script>  document.getelementbyid("demo").innerhtml = 5 + 6;  </script>    </body>  </html> 

it working perfectly, take @ output below. may haven't saved changes correctly.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -