得到当前节点的第一个子节点
$("div").children().eq(0)
多选框循环
$("[name='ids']:checkbox").each(function(){
if ($(this).attr("checked")==true){
i++;
str+=$(this).val()+"_";
}
});
下拉列表所选的选项中的属性
alert($("#batch_bz option:selected").attr("je"));
css 设置
$("p").css("color","red");
改变兄弟td 内的元素的属性
$(this).parents("tr").find("td").eq(2).find("select").get(0).options.length = 0;
本文介绍了使用jQuery进行DOM操作的方法,包括获取节点、遍历多选框、读取下拉列表属性及修改元素样式等内容。
5899

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



