Selector:
find() to get all descendant elements
cell creation
rowspan=
"2" merges the upper and lower columns
colspan = "2" to merge the left and right columns
Format of cells: table < thead <th
<tbody<td this is their format
And in this chapter, I learned how json links to html, which is of great significance
JQuery's dom operation:
$(xxx).html() to get his html text
$(xxx).text() gets his text
$(xxx).val() gets his value and adds data when there is something inside the parentheses
Style operation:
When we operate the style, try to operate the style class
addClass add
removerClass cancel
hasClass checks if the matched element has that class
position() returns the position of the first matched element relative to the parent element
distance from the top of scorllTop()
distance to the left of scrollLeft()
window is global
JQuery scroll event
$().on("scroll",function(){})
property manipulation
attr() set return or what attribute
removeAttr() removes what attribute
dynamically created
append() inserts content at the end of the selected element
append to() to append to
event handling
blue() loses focus
mouerleave() will be triggered when the mouse leaves
change() changes
bind event
on("event","label" function(){}) this points to the dom object when the JQuery event responds to the method
one() binding once event cannot be executed after binding once
off() unbind event
selected
multipte This is used for drop down menus to display all menus
mobile form case
Method: The main application of the appendTo function is to move its own element to another element to realize the mobile form. One thing to pay attention to is to remember to set the id of the label and when there is a single selection: selected
vertical-align:top 这个就是把你的表单对其下一个表单的顶部
城市选择
$
.
each
(CITYS
,function
(i
,
value){
$
(
"#province"
).
append
(
"<option>"
+ i +
"</option>"
)
;
})
;
这个就是把each当做for来使用 是特别好用的东西直接添加你想要的东西就好了,each第一个就是数组 function有两个参数 第一个索引 第二个值是索引值 添加元素就是
$
(
"#province"
).
append
(
"<option>"
+ i +
"</option>"
)
后面加个to就是移动到 应该是这个意思
$
(
"#province"
).
triggerHandler
(
'change'
)
;
初始城市数据的作用
var
pro =
$
(
"#province option:selected"
).
text
()
;
这个是你挑选的那个文本
qq表情选择 :
绝对定位的元素具有包裹性 absolute
for(key in 数据)这个就是for in函数 key是文件的索引 还有一个就是文件的数据包 也就是变量