1、關於display顯示和隱藏問題
document.getElementById("id").style.display="";//表示顯示
document.getElementById("id").style.display="none";//表示隱藏
2、js調用關閉事件
<script language="javascript">
function closeCurrWindow(){
var browserName=navigator.appName;
alert(browserName);
if (browserName=="Netscape") {
window.open('','_self','');
window.close();
} else if (browserName=="Microsoft Internet Explorer") {
window.opener = "whoCares";
window.opener = null; //Close window, not hint. for IE6, IE7
window.open('','_top'); //Close window, not hint. for IE7
window.close();
}
}
</script>