<html>
<head><style>
#myDIV {
width: 150%;
padding: 75px 0;
text-align: center;
background-color: lightblue;
margin-top: 20px;
}
</style>
</head>
<body>
<button onclick="myFunction()">WWW.DIZSWEB.COM
</button>
<div id="myID">
This is my DIV element.
</div>
// JAVAScipt which will work to hide and show
<script>
function myFunction() {var x = document.getElementById("myID");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
No comments:
Post a Comment