Hi everybody,
I am learning javascript on this website. But when I did that simple exercice in the begining, it did not work.
<!DOCTYPE html><html>
<head>
<script>function myFunction() { document.getElementById("demo").innerHTML = "Paragraph changed.";</script>
<body><script src="jvsTest.js"></script><h1>My Web Page</h1><p id="demo">A Paragraph</p><button type="button" onclick="MyFunction()">Try it</button></body></html>
When you go to the demo page, you click on the button and it changes from: 'A paragraph' to 'Paragraph changed'.
so I tried it and (I use notepad++) it didn't work. I did like above, then with javascript in the <body> section, then on a separate sheet with javascript language. Still, it didn't work.
As a matter of fact, I tried the other javascripts I wrote, did not work either. My browser is Firefox, I disabled the block pop up window and tried it on Explorer and Google Chrome, and nothing works. So what could be the problem?
Why it does not work?