0

I'm not sure why this isn't working, there doesn't seem to be any typos and, to me, this is function code, however the

element does not change when the button is clicked. No error message. Any help appreciated.

<!DOCTYPE HTML>
<html>
<body>
<h1>Testing Page</h1>

<p id="hello">This will change.</p>

<p>
<button type="button" onclick="click()">Click Dis Ahlie</button>
</p>

<script type="text/javascript">
function click(){document.getElementById("hello").innerHTML="Hello";}
</script>
</body>
</html>
zarya
  • 29
  • 3

0 Answers0