我正在尝试单击侧面导航项,然后让它在我的内容中突出显示div,但还需要打开更多信息链接。这是我到目前为止的代码。
这是我目前使用的侧面导航代码。我知道这不是很漂亮的代码。
<ul class="side">
<li><a href='Default.aspx#range' onclick = "document.getElementById('range').style.backgroundColor = '#FFFF66'; document.getElementById('satisfaction').style.backgroundColor = '#ffffff';">Range</a></li>
<li><a href='Default.aspx#satisfaction' onclick = "document.getElementById('satisfaction').style.backgroundColor = '#FFFF66'; document.getElementById('range').style.backgroundColor = '#ffffff';">Satisfaction</a></li>
</ul>
这是我的内容代码..
<div id="Range">
<div class="header">Range<br /><a id="button1" href="javascript:toggle2('colcontent1','button1');" ><img src="images/more-info-button.png" width="76" height="20" /></a></div>
<div class="col2">;lekjra</div>
<div class="col3">;aeihba</div>
<div class="col4">aeb;</div>
</div> <!-- End of priceRange div -->
<div style="clear:both;"></div>
<div id="collapse">
<div id="colcontent1">
<div class="header"></div>
<div class="col2">jls.r;</div>
<div class="col3">a;ebb</div>
<div class="col4">;ihae</div>
</div>
</div>
<div id="satisfaction">
<div class="header">Satisfaction <br /><a id="button2" href="javascript:toggle2('colcontent2','button2');" ><img src="images/more-info-button.png" width="76" height="20" /></a></div>
<div class="col2">;iahib</div>
<div class="col3">ai;hei</div>
<div class="col4">akhge'l</div>
</div> <!-- End of satisfaction div -->
<div style="clear:both;"></div>
<div id="collapse">
<div id="colcontent2">
<div class="header"></div>
<div class="col2">;agei;</div>
<div class="col3">alghel;</div>
<div class="col4">ah;gioehai</div>
</div>
</div>
如果您有任何建议,请告诉我!
谢谢!