I need to hide a div with all the content inside it using this code:
<form action="" method="POST" name="form">
<p for="name">text :</p><input type="text" name="name" value="<?php echo $name_g; ?>" onfocus="ClearPlaceHolder (this)" onblur="SetPlaceHolder (this)"/>
<p for="phone">text :</p><input type="text" name="phone" value="<?php echo $phone_g; ?>" onfocus="ClearPlaceHolder (this)" onblur="SetPlaceHolder (this)"/>
<p for="blood">text :</p><input type="text" name="blood" value="<?php echo $blood_g; ?>" onfocus="ClearPlaceHolder (this)" onblur="SetPlaceHolder (this)"/>
<p for="id">text :</p><input type="text" name="id" value="<?php echo $id2_g; ?>" onfocus="ClearPlaceHolder (this)" onblur="SetPlaceHolder (this)"/>
<p for="email">text : </p><input type="text" name="email" value="<?php echo $email_g; ?>" onfocus="ClearPlaceHolder (this)" onblur="SetPlaceHolder (this)"/>
<input type="button" onclick =" printvalues();" value="text">
<div id="info_check">
<script type="text/javascript">
function printvalues() {
var div = document.getElementById("info_check");
div.innerHTML += "<span>text :</span>"+form.name.value+"<br>";
div.innerHTML += "<span>text :</span>"+form.phone.value+"<br>";
div.innerHTML += "<span>text :</span>"+form.blood.value+"<br>";
div.innerHTML += "<span>text :</span>"+form.id.value+"<br>";
div.innerHTML += "<span>text :</span>"+form.email.value+"<br>";
div.innerHTML += "<input type='submit' name='sub' value='text'/>";
$("#info_check").show();
}
</script>
<h2>text</h2>
<input type='button' onclick="$('#info_check').hide();" value='text' style='background: #F00 none repeat scroll 0% 0%; min-width: 20px; width: 80px;color: #fff; border-radius:4px; text-decoration: none; margin-right: 10px;'/>
</div>
</form>
I am facing an issue where I need to hide #info_check along with all its content.