進入該頁面時只顯示常見的幾個問題,當點擊某個問題的時候,
其下方就會展開顯示問題的答案.而當再次點擊該問題部分或者點擊顯示其他問題的時候,
該問題的答案部分就會收縮隱藏~

能不能做成:點一下 問題,下面的答案就出來,
而 再點一下 問題 ,答案又隱藏起來呢?
現在的是點一下問題,答案出來了,
而點一下其他的 問題,原來的答案隱藏了,新的答案出來了。

ShowFAQ01.htm,點擊觀看...
ShowFAQ02.htm,點擊觀看...

程序代碼 程序代碼
<div id="aaa" style="display:none;">This div should be hide</div>
<div id="btnShow" onclick="javascript:document.getElementById('aaa').style.display='block' ">Show</div>
<div id="btnHide" onclick="javascript:document.getElementById('aaa').style.display='none' ">Hide</div>


另一種方式...選單的效果...
ShowFAQ03.htm,點擊觀看...

這裡問個和主題無關的問題:
<LI>
<DL>
<DT>問題1
<DD style="DISPLAY: none">答:1 </DD></DL>
<LI>
可以說說這標籤DL\DT\DD的詳細用法和作用嗎?

看sharkui的翻譯吧:
http://www.sharkui.com/reference/htmltags/tags.php?tag=dl
http://www.sharkui.com/reference/htmltags/tags.php?tag=dt
http://www.sharkui.com/reference/htmltags/tags.php?tag=dd
arrow
arrow
    全站熱搜

    kevin0523 發表在 痞客邦 留言(0) 人氣()