请教一下导航栏切换页面后的定位问题 本帖最后由 phpisshow 于 2010-03-29 12:59:02 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>js测试</title><style>#main{ width:350px; height:20px; float:left; border:1px solid red;}.main_son{ width:80px; height:18px; margin-left:25px; float:left; cursor:pointer; border:1px solid yellow;}.old{ background:#666;}</style><script src="jquery-1.3.2.js"></script><script> $(document).ready(function(){ $("#first").addClass("old").focus(); $(".main_son").click(function(){ $(this).addClass("old").siblings().removeClass("old"); }); });</script></head><body><div id="main"> <div class="main_son" id="first">网站首页</div> <div class="main_son" id="company">公司简介</div> <div class="main_son" id="connect">联系我们</div></div></body></html>不知道是不是符合你的要求,不是的话给我留言 lieri111,谢谢回答,但你这个是只在同一个页面。我现在想要的是点击链接跳转到别的页面后。 急求:js中注销Session问题 javascript中的中文转换问题 网页对话框问题 javascript如何实现关闭弹出窗口,自动刷新打开它的页面 如何实现这样的效果? 请教一个IFRAME的打印问题! 怎样在网页里面屏蔽回车键?谢谢! 如何实现一个Javascript?很简单的。 判断是否数字?很简单! 有没有办法将 REFRESH 之前弹出的窗口关闭? Ext显示问题 用ext 上传excel表格,出现脚本错误!请高手解决!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>js测试</title>
<style>
#main{
width:350px;
height:20px;
float:left;
border:1px solid red;
}
.main_son{
width:80px;
height:18px;
margin-left:25px;
float:left;
cursor:pointer;
border:1px solid yellow;
}
.old{
background:#666;
}
</style>
<script src="jquery-1.3.2.js"></script>
<script>
$(document).ready(function(){
$("#first").addClass("old").focus();
$(".main_son").click(function(){
$(this).addClass("old").siblings().removeClass("old");
});
});
</script>
</head>
<body>
<div id="main">
<div class="main_son" id="first">网站首页</div>
<div class="main_son" id="company">公司简介</div>
<div class="main_son" id="connect">联系我们</div>
</div>
</body>
</html>不知道是不是符合你的要求,不是的话给我留言