<html>
<head>
<meta content="width=device-width, initial-scale=1"></head>
<body>
<button onclick="myFunction()">
Click Me
</button>
<div id="myID">www.dizsweb.com</div>
<script>
function myFunction() {var x = document.getElementById("myID");
if (x.innerHTML === "www.dizsweb.com") {
x.innerHTML = "Programming Logic and Code";
} else {
x.innerHTML = "www.dizsweb.com";
}
}
No comments:
Post a Comment