I have the following code. I want to show div on button click but hide if clicked else where. The below code never shows the div
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function Toggle(o) {
if (o.tagName != "BODY" && o.id == "btn") {
document.getElementById("dv").style.display = "block";
return;
}
document.getElementById("dv").style.display = "none";
}
</script>
</head>
<body onclick = "Toggle(this)">
<form id="form1">
<input type = "button" onclick = "Toggle(this)" id = "btn" value = "Click me" />
<div id = "dv" style = "display:none">Hello</div>
</form>
</body>
</html>