<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www./TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www./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>
|