<script language="javascript" type="text/javascript">
$(document).ready(function () {
var message = GetQueryString('cid')
switch (message) {
case '6': $("#nav_1").addClass("select")document.getElementById("nav_1").style.color = "White"break
case '7': $("#nav_2").addClass("select")document.getElementById("nav_2").style.color = "White"break
…… }
})
function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)")
var r = window.location.search.substr(1).match(reg)
if (r != null) return unescape(r[2])return null
}
</script>
<!--[if lte IE 6]>
<script language="javascript" type="text/javascript">
$(document).ready(function () {
var message = GetQueryString('cid')
switch (message) {
case '6': $("#nav2_1").addClass("select1")document.getElementById("nav2_1").style.color = "White"break
case '7': $("#nav2_2").addClass("select1")document.getElementById("nav2_2").style.color = "White"break
…… }
})
function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)")
var r = window.location.search.substr(1).match(reg)
if (r != null) return unescape(r[2])return null
}
</script>
<![endif]--> //兼容ie6
链接中加入相应的id <a class="hide" href="list.aspx?cid=7" target="_blank" id="nav_2">政策文件</a>
<!--[if lte IE 6]>
<a href="list.aspx?cid=6" target="_blank" id="nav2_1">公告消息
<table><tr><td>
<![endif]--> //兼容IE6.