HTML
<div id="showalertdiv" style="color:green;display:none;height:50%"> <h3>Please do you progress message here...</h3><br> <input type="button" value="Close Div" onClick="closealertdiv()" style="margin-left:40%;margin-top:2%"/> </div> <div id="showcontentdiv"> <b>Display Full Screen Div</b><br><br> <input type="button" value="Display Div" onClick="displaydiv()"/> </div>
JavaScript
function displaydiv(){
//alert("Test");
document.getElementById("showalertdiv").style.display = "";
document.getElementById("showcontentdiv").style.display = "none";
}
function closealertdiv(){
//alert("Close Test");
document.getElementById("showalertdiv").style.display = "none";
document.getElementById("showcontentdiv").style.display = "";
}
Example
Click Here to DEMO











0 comments:
Post a Comment