代碼如下:
<html>
<head>
<meta http
<title>oec
<script language="JavaScript" type="text/JavaScript">
<!
function toggle(targetid){
if (document
target=document
if (target
target
} else {
target
}
}
}
</script>
<style type="text/css">
<!
#div
background
height:
width:
display:none;
}
</style>
</head>
<body>
<input type="button" id="butn" value="顯示/隱藏" onclick="toggle(
<center>
<div id="div
居中的DIV
</body>
</html>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20600.html