$("div p");(1) $("div.container")(2) $("div #msg");(3) $("table a",context);(4)
http://realazy.org/blog/2006/08/31/small-jquery-tutorial/
$(document).ready(function(){
if ($.browser.msie){
$(”input[@type=’text’], input[@type=’password’], textarea”).focus(function(){$(this).css({background:”#fcc”, border:”1px solid #f00″})}).blur(function(){$(this).css({background: “transparent”, border: “1px solid #ccc”})});
}
})$(document).ready(function(){
if ($.browser.msie){
$("input[@type='text'], input[@type='password'], textarea").focus(function(){$(this).addClass("ie_focus")}).blur(function(){$(this).removeClass("ie_focus")});
}
})
本文介绍了一个简单的jQuery教程,展示了如何使用jQuery选择器定位DOM元素,并为Internet Explorer浏览器中的文本框和密码框添加焦点高亮效果。
2369

被折叠的 条评论
为什么被折叠?



