1.CSS style operation
1) Get Style $ (' div '). css (' width '));
2) Get more than one style of an element $ (' div '). css ([' width ', ' height '])
3) Modify Style $ (' div '). css (' width ', ' 200px ');
$ (' div '). css (' Color ', function (index,value) {
Console.log (index,value); return ' Pink ';
});
4) bulk Modify Style $ (' div '). css ({' Color ': ' Pink ', ' width ': ' 200px '});
2.value operation
1) Get the text box contents $ (' input '). Val ();
2). Gets the check box for the selected content:console.log ($ ('. box:checked '));
3 sets the value of the text box to $ ('. Text '). Val ("Country");
4) Set check box to select $ ('. Box '). val ([1,3]);
5) Gets the value of the radio box of $ ('. s:checked '). Val ();
6) Set the value of the radio box to $ ('. S '). Val ([' C ']);
7) Gets the value of the drop-down list by selecting $ (' option:selected '). Val ();
Multi-Select $ (' select '). Val ()
8) Set the value of the drop-down list to $ (' select '). val ([' E ', ' A ']);
3. Simple event operation
1) mouseover
2) mouseout
3) MouseEnter () and MouseLeave () do not trigger when passing through a child element
The MouseOver event is triggered regardless of whether the mouse pointer passes through the selected element or its child elements.
The MouseEnter event is triggered only when the mouse pointer passes through the selected element.
jquery Basic Operations