运行结果
1.获取某个元素的id, name $(document).ready(function(){id = $('div').eq(0).attr('id');alert(id)alert($(this).attr("name"))});
一、jQuery的DOM操作(1)查找节点: 查找元素节点: 1. 获取指定的标签节点 $(“上级标签 标签:eq(“标签索引”) ; 如:var li = $("ul li:eq(2)"); 2. 获取标签节点$(“标签”) 3. 获取标签节点文本
jQuery website CSS1 CSS2 CSS3 Basic XPath ...
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M