Finds the last span in each matched div and adds some css plus a hover state.
$("div span:last-child")
.css({color:"red", fontSize:"80%"})
.hover(function () {
$(this).addClass("solast");
}, function () {
$(this).removeClass("solast");
});
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("div span:last-child")
.css({color:"red", fontSize:"80%"})
.hover(function () {
$(this).addClass("solast");
}, function () {
$(this).removeClass("solast");
});
});
</script>
<style>
span.solast { text-decoration:line-through; }
</style>
</head>
<body>
<div>
<span>John,</span>
<span>Karl,</span>
<span>Brandon,</span>
<span>Sam</span>
</div>
<div>
<span>Glen,</span>
<span>Tane,</span>
<span>Ralph,</span>
<span>David</span>
</div>
</body>
</html>
http://docs.jquery.com/Selectors/lastChild
readyState获取请求操作的当前状态, http://msdn2.microsoft.com/en-us/library/ms534361.aspx
jQuery淡入特效,http://docs.jquery.com/Effects/fadeIn
:input匹配所有input, textarea, select和button元素, http://docs.jquery.com/Selectors/input
选择器在选择body中出现的title标记时,会出现和预期不同的效果。element按指定名称匹配所有元素, http://docs.jquery.com/Selectors/element
lastChild选择最后一个子元素, http://docs.jquery.com/Selectors/lastChild
val获取第一个匹配元素value属性的内容, http://docs.jquery.com/Attributes/val
focus响应每个匹配元素的焦点事件, http://docs.jquery.com/Events/focus
click单击, 触发每个匹配元素的单击事件, 绑定函数到每个匹配元素的单击事件, http://docs.jquery.com/Events/click
after在每个匹配的元素之后插入内容, http://docs.jquery.com/Manipulation/after
Jeditable原位置编辑器插件, http://plugins.jquery.com/project/jeditable
Cookie, http://plugins.jquery.com/project/Cookie
JScript (Windows Script Technologies):, http://msdn2.microsoft.com/en-us/library/hbxc2t98.aspx
prototype Property (JScript 5.6):, http://msdn2.microsoft.com/en-us/library/f5s9ycex.aspx
parseInt Method (JScript 5.6):, http://msdn2.microsoft.com/en-us/library/x53yedee.aspx
toString Method (JScript 5.6):, http://msdn2.microsoft.com/en-us/library/k6xhc6yc.aspx
HTTP Status Codes (Windows):, http://msdn2.microsoft.com/en-us/library/Aa384325.aspx
HTML+TIME:, http://msdn2.microsoft.com/en-us/library/ms533112.aspx
HTA:APPLICATION对象, http://msdn2.microsoft.com/en-us/library/ms536495.aspx
How to Build Tables Dynamically:如何动态构建表格, http://msdn2.microsoft.com/en-us/library/ms532998.aspx
close Method (window):, http://msdn2.microsoft.com/en-us/library/ms536367.aspx
ECMA标准下载, http://www.ecma-international.org/publications/standards/Ecma-262.htm
parseInt Method (JScript 5.6): - IE标准, http://msdn2.microsoft.com/en-us/library/x53yedee.aspx
fireEvent Method (A, ABBR, ACRONYM, ...):, http://msdn2.microsoft.com/en-us/library/ms536423.aspx
SunSpider JavaScript Benchmark: JavaScript性能测试, http://webkit.org/perf/sunspider-0.9/sunspider.html
实现前一个和后一个效果
跨窗口调用函数
定时刷新
下拉列表框打开指定网站
生成在两个边界间的随机数密码输入框与标签自动更换
文本输入区域与标签自动更换
Pre标签在IE与Firefox下效果相对理想的换行处理
固定表头,滚动表格内容再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow