how to create simple pop-up in html and javascript
there is the complete code of creating simple pup-up form.
<script>
function show(){ document.getElementById('my_id').style.display="block";}
function hide(){ document.getElementById('my_id').style.display="none";}
</script>
<div id="my_id" style="display:none;position: fixed;top: 27%;background: black;opacity: 0.6;left: 33%;color: white;">
<span style="float: right;color: white; cursor:pointer" onclick="hide()">close</span>
<form action="" method="post">
element of form
<input type="text" name="name" maxlength="100" value="" class="width257 formElement" id="name">
</form>
</div>
there is the complete code of creating simple pup-up form.
<script>
function show(){ document.getElementById('my_id').style.display="block";}
function hide(){ document.getElementById('my_id').style.display="none";}
</script>
<div id="my_id" style="display:none;position: fixed;top: 27%;background: black;opacity: 0.6;left: 33%;color: white;">
<span style="float: right;color: white; cursor:pointer" onclick="hide()">close</span>
<form action="" method="post">
element of form
<input type="text" name="name" maxlength="100" value="" class="width257 formElement" id="name">
</form>
</div>
No comments:
Post a Comment