posts - 431,  comments - 344,  trackbacks - 0

          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
          <HTML>
           <HEAD>
            <TITLE> Toggle </TITLE>
            <script type="text/JavaScript">
           function toggle(sDivId) {
            var oDiv = document.getElementById(sDivId);
            oDiv.style.display = (oDiv.style.display == "none") ? "block":"none";
           }

            </script>
           </HEAD>

           <BODY>
           <div style ="background-color:blue; color:white; font-weight:bold; padding:10px; cursor:pointer" onclick="toggle('divContent1');">Click Here</div>
           <div style="border:3px solid blue; height:100px;padding:10px" id="divContent1">
            This is some content to show and hide.
           </div>
           <div style ="background-color:blue; color:white; font-weight:bold; padding:10px; cursor:pointer" onclick="toggle('divContent2');">Click Here</div>
           <div style="border:3px solid blue; height:100px;padding:10px" id="divContent2">
            This is some content to show and hide.
           </div>
           </BODY>
          </HTML>

          posted on 2008-01-23 16:20 周銳 閱讀(458) 評論(0)  編輯  收藏 所屬分類: CSSHTMLJavaScript
          主站蜘蛛池模板: 罗平县| 平顶山市| 东莞市| 内乡县| 尉犁县| 和政县| 大理市| 邵东县| 乌审旗| 定远县| 上思县| 南康市| 武功县| 缙云县| 江永县| 高雄市| 扬中市| 巨鹿县| 郯城县| 枝江市| 筠连县| 曲松县| 陆良县| 湖北省| 垣曲县| 宽甸| 岗巴县| 孟津县| 富裕县| 达州市| 安庆市| 炉霍县| 乐陵市| 平昌县| 温泉县| 长春市| 修水县| 炉霍县| 元阳县| 乌兰县| 沧州市|