jquery event is simpler than JS, especially the number of code is obviously more abbreviated, here are two examples of jquery events, one is the full select event, one is the navigation bar mouse over the Remove event:
One, select All events:
"Content-type"Content="text/html; Charset=utf-8"/><script src=".. /.. /.. /phpstudy/www/jquery-3.2.0.min.js"></script><title> Untitled Document </title>"checkbox"Value="QX"Id="QX"/> Select </div><br/><div><input type="checkbox"Value="1" class="ck"/>Lu Fei<input type="checkbox"Value="1" class="ck"/>Sauron<input type="checkbox"Value="1" class="ck"/>Shan Zhi<input type="checkbox"Value="1" class="ck"/>na mei<input type="checkbox"Value="1" class="ck"/>Usopp<input type="checkbox"Value="1" class="ck"/>Frankie</div></body><script type="Text/javascript">$("#qx"). Click (function () {//find selection of the Select All button//var XZ = $ (this) [0].checked; varXZ = $ ( This). Prop ("checked"); //Change all checkbox selection status$(". CK"). Prop ("checked", XZ); })</script>Second, move the mouse over the navigation bar to remove the event
<style>. a{width:50px; height:20px; float: Left; margin:10px; }</style><script src="Jquery-3.2.0.min.js"></script>class="a"> Home </div><divclass="a"> Shiji </div><divclass="a"> Chinese Book </div><divclass="a"> Later Han book </div><divclass="a"> Kingdoms </div></body><script>$(". A"). MouseOver (function () {$ ( This). CSS ("Background-color","#666")//turn Gray after clicking})$(". A"). Mouseout (function () {$ ( This). CSS ("Background-color","#FFF")//change to White after removal}) </script>Examples of jquery simple events