惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
C
Cisco Blogs
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Scott Helme
Scott Helme
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
M
MIT News - Artificial intelligence
L
LINUX DO - 热门话题
I
InfoQ
GbyAI
GbyAI
NISL@THU
NISL@THU
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Engineering at Meta
Engineering at Meta
H
Hackread – Cybersecurity News, Data Breaches, AI and More
TaoSecurity Blog
TaoSecurity Blog
Simon Willison's Weblog
Simon Willison's Weblog
A
About on SuperTechFans
Spread Privacy
Spread Privacy
月光博客
月光博客
W
WeLiveSecurity
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
有赞技术团队
有赞技术团队
Security Latest
Security Latest
人人都是产品经理
人人都是产品经理
PCI Perspectives
PCI Perspectives
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
T
Troy Hunt's Blog
Martin Fowler
Martin Fowler
The Hacker News
The Hacker News
T
Tor Project blog
C
CERT Recently Published Vulnerability Notes
Apple Machine Learning Research
Apple Machine Learning Research
Stack Overflow Blog
Stack Overflow Blog
K
Kaspersky official blog
Cloudbric
Cloudbric
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tailwind CSS Blog
D
DataBreaches.Net
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Tenable Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - Franky
L
LINUX DO - 最新话题
MyScale Blog
MyScale Blog

博客园 - 五味果

.net Core 调用微信Jsapi接口,H5解析二维码 TextBoxFor控件的扩展---Bootstrap在mvc上的应用 Dapper Vs Dbentry 外地手机号码,请在号码前加拨0 Sql 2012 远程数据库连接 DbEntry在Vs2012里的配置 终点,也是新的起点! 天气预报数据查询接口 关于浏览器账号的一个愿望 关于移动,联通,电信的区分。 - 五味果 - 博客园 被#号折腾了。 Orm 请别让数据库中的默认值形同虚设!! 利用反射,泛型,静态方法快速获取表单值到Model。 subsonic sqlite 路径问题 - 五味果 ORM是工具,工具是用来提高开发速度的。 基于XML的后台管理系统--设想 项模板的使用--提高编程速度 C#开发编码规范 IIS7下运行Access+Asp的解决方法
基于Jquery的内容显示模块 - 五味果 - 博客园
五味果 · 2008-04-23 · via 博客园 - 五味果

    最近在学习Jquery,看到好多网站的内容切换模块,也想用Jquery做一个。很简单。代码如下:

<!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>
    
<title>无标题页</title>
    
<script src="js/jquery-1.2.3-intellisense.js" type="text/javascript"></script>
  
<style type="text/css">
.menu
{ margin:0; padding:0; border:0; width:300px;}
.menu div
{ width:300px; height:200px; border-color:Red;  border-style:solid; border-width:1px; color:Red; float:left; display:none }
.menu ul
{  padding:0; margin:0; list-style-type:none; float:left;}
.menu li
{ width:70px; border-width:1px 1px 0px 1px; border-color:Red; border-style:solid; float:left;height:28px; margin-right:2px; text-align:center; line-height:28px; font-weight:bold;}
</style> 
<script type="text/javascript" language="javascript">
$(document).ready(
function(){
$(
".menu div:eq(0)").css("display","block")
$(
"li:eq(0)").css("background","#eee")
$(
"li").mouseover(function(index){
$(
"li").css("color","");
$(
this).css("color","red")
var tex=$(this);
$(
".menu div").css("dispaly","none");
for(k=0;k<$(".menu li").length;k++)
{
    
if($(".menu li:eq("+k+")").text()==tex.text())
    
{
        $(
".menu li").css("background","");
         $(
".menu li:eq("+k+")").css("background","#eee");
         
if(k<$(".menu div").length)
         
{
        $(
".menu div").css("display","none")
        $(
".menu div:eq("+k+")").css("display","block")
        }

    }

}

}
)
}
)
    
</script>
</head>
<body>
<div class="menu">
<ul><li>选项一</li><li>选项二</li><li>选项三</li><li>选项四</li></ul>
<div>我是选项一</div>
<div>我是选项二</div>
<div>我是选项三</div>
</div>
</body>
</html>

    感觉jquery非常的方便,实现一些小功能很容易。