<script>
function close()
{
if(event.srcElement != document.getElementById( "div1 "))
{
document.form1.getElementById( "div1 ").style.display = "none "
}
}
</script>
<form id= "form1 " runat= "server ">
<div id= "div1 ">
<asp:ImageButton ID= "ImageButton1 " runat= "server " Height= "13px " ImageUrl= "~/images/close.gif " OnClientClick= "close() "
</div>
</form>
哪里不对啊
------解决方案--------------------------------------------------------
<script>
function hide()
{
document.getElementById( "div1 ").style.display = "none ";
}
</script>
<form id= "form1 " runat= "server ">
<div id= "div1 ">
<asp:ImageButton ID= "ImageButton1 " runat= "server " Height= "13px " ImageUrl= "~/images/close.gif " OnClientClick= "hide() " />
</div>
</form>