hi there i just wanna make the button on html when it clicking,the result of content from each function could be change with each name of function.but in this my code,it doesnt change unfortunately.and just appears result from function 3,and when i click second and third and this doesnt changed at all.
<!DOCTYPE html>
<html>
<body>
<h1>HTML DOM Events</h1>
<h2>The onclick Event</h2>
<p>The onclick event triggers a function when an element is clicked on.</p>
<p>Click to trigger a function that will output "Hello World":</p>
<button onclick="myFunction(),myFunction2(),myFunction3()">Click me</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World";
}
function myFunction2() {
document.getElementById("demo").innerHTML = "Hello lllo";
}
function myFunction3() {
document.getElementById("demo").innerHTML = "Hello ok";
}
</script>
</body>
</html>