发表于: 2017-01-09 23:50:11
1 1275
今天完成的事:
回顾了昨天看的jq选择器,继续学习了jQuery的基础知识-Dom操作;
明天要做的事:
学习jq的dom操作;jq的动画与事件;
遇到的困难:
锋利的jQuery(第二版)中对子元素过滤选择器的介绍是每个父元素下的子元素,但我在操作中出效果的是第一个父元素下的子元素;
不知道是哪里的问题?
学到的东西:
重新回顾整理了下jq选择器:
jQyery转成Dom对象:
1:var $cr=$("#cr");
var cr=$cr[0];
2: var $cr=$("#cr");
var cr=$cr.get(0);
Dom装换成jQuery对象:
1:var cr=document.getElementById("cr");
var $cr=$(cr);
jQuery选择器分为:
基本选择器
层次选择器
过滤选择器: :first :last :not(selector) :even :odd :eq(index) :gt(index) :lt(index) :header :animated :focus
:contains(text) :empty :has(selector) :parent
:hidden :visible
[attribute] [attribute=value] [attribute!=value] [attribute^=value] [attribute$=value] [attribute*=value] [attribute|=value] [attribute~=value] [attribute1][attribute2][attributeN]
:nth-child :first-child :last-child :only-child
:enabled :disabled :checked :selected
:input :text :password :radio :checkbox :submit :image :reset :button :file :hidden
表单选择器
评论