我在做个导栏航,菜单如:菜单1 菜单2 菜单3(都是图片)
当打开首页面时,菜单1被选中,其它菜单未被选中
当点击菜单2时,来到菜单2的页面,这时菜单2显示为已选中图片,菜单3或菜单1时为回原图
于此类推
问题出现在这里
怎样使得当我打开首页也,菜单1永远处于选中状态,其它菜单未被选中
当打开首页面时,菜单1被选中,其它菜单未被选中
当点击菜单2时,来到菜单2的页面,这时菜单2显示为已选中图片,菜单3或菜单1时为回原图
于此类推
问题出现在这里
怎样使得当我打开首页也,菜单1永远处于选中状态,其它菜单未被选中
解决方案 »
- 监听器怎么返回多个Button的值
- 请用SimpleDateFormat解析这个,Sun Jan 29 14:34:06 格林尼治标准时间+0800 2012
- struts2 和 spring 整合的问题
- spring的一个事物配置出问题了求救!!!!!!!!!问号里面怎么写啊?我有好多个模块不知道怎么填
- Tomcat应用服务器访问速度有时会特别的慢?请高人指点
- Hibernate里面的HQL支持UNION吗?
- javascript
- s.split 提示错误没有为类型String定义split(String )请问这是怎么回事啊
- 关于javaweb获取客户端ip地址的问题。
- PageHelper 如何解决插入数据同时分页查询 数据重复问题
- 我的Mysql问题.
- Dtree中createTree(Tree,1,7); 的问题
function senfe() {
if( document.getElementById("senfe1").src = "button01a.gif"){
document.getElementById("senfe1").src = "button01a.gif";
document.getElementById("senfe2").src = "button02.gif";
document.getElementById("senfe3").src = "button03.gif";
}
}
function sen() {
if(document.getElementById("senfe2").src = "button01.gif") {
document.getElementById("senfe1").src = "button01.gif";
document.getElementById("senfe2").src = "button02a.gif";
document.getElementById("senfe3").src = "button03.gif";
}
}
function senf() {
if(document.getElementById("senfe3").src = "button01.gif") {
document.getElementById("senfe1").src = "button01.gif";
document.getElementById("senfe2").src = "button02.gif";
document.getElementById("senfe3").src = "button03a.gif";
}
}
</script>
<input type="image" id="senfe1" src="button01a.gif" onclick="senfe()">
<input type="image" id="senfe2" src="button02.gif" onclick="sen()">
<input type="image" id="senfe3" src="button03.gif" onclick="senf()">每个菜单图片做2个,一个颜色深,一个浅,选种的时候变深,没有被选种的时候颜色为浅