<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
</head>
<script>
function qh()
{
if (document.getElementById("div1").style.display=="none")
{
document.getElementById("div1").style.display="";
}
else
{
document.getElementById("div1").style.display="none";
}
}
</script>
<body>
<input type="button" value="切換" onclick="qh()" />
<div style="width:200px; height:800px; float:left; background:#000;"></div>
<div id="div1" style="width:200px; height:800px; float:left; background:#060;"></div>
<div style="width:200px; height:800px; float:left; background:#0F0;"></div>
</body>
</html>