Below are the code:<html>
<head>
<script>
function fnchecked(blnchecked,divid)
{
if(blnchecked)
{
document.getElementById(divid).style.display = "";
}
else
{
document.getElementById(divid).style.display = "none";
}
}
</script>
</head>
<body>
<input type="checkbox" name="fldcheckbox" id="fldcheckbox" onclick="fnchecked(this.checked,'divcheck');"/>
<div id="divcheck" style="display:none;">
this is a test file
</div>
</body>
</html>