<div id="z1" onclick="document.getElementById('q1').style.display=''; document.getElementById('z1').style.display='none';" style="border:solid 1px; background- color: #DDDDDD; width:936px; height:auto; margin-left:0px;margin-right:0px;">
<h2> Pg. 419-423, problems 8-14 even, 20-30 odd, AYP 1-10</h2></div>
<div id="q1" onclick="document.getElementById('q1').style.display='none'; document.getElementById('z1').style.display='';" style="display:none; border:solid 1px; background-color: #DDDDDD; width:938px; height:auto;margin-left:0px;margin-right:0px;">
<h2> Pg. 419-423, problems 8-14 even, 20-30 odd, AYP 1-10</h2>
</br>
<img src="http://www.rediker.com/reports/samples/Attendance-Period/Homework-Assignment- form.jpg"></img></div>
上面的腳本就是我計劃用來創建擾流板的。基本上,當用戶點擊z1元素時,它隱藏自身並顯示q1元素,反之亦然。它適用於除IE以外的所有瀏覽器。連接Jquery將是一個小的責任。在IE中不能工作的HTML/Javascript劇本腳本(顯示/隱藏)
內嵌JavaScript ???看起來不好。 – Praveen
jQuery不是必需的。這是純javascript。 – defau1t
這是生活在一個真實的網站,我們可以訪問? –