jQuery - ປຶ້ມການອະທິບາຍ - ຄູ່ມວັດ

ຄູ່ມວັດ jQuery

ຄູ່ມືຄັດເລືອກ ບົດສະຫຼຸບ ຄັດເລືອກ
* $("*") ບັນດາຫຼັກຂໍ້ມູນທັງໝົດ
#id $("#lastname") element id="lastname"
.class $(".intro") ບັນດາຫຼັກຂໍ້ມູນທີ່ class="intro"
element $("p") ບັນດາ <p> ທັງໝົດ
.class.class $(".intro.demo") ບັນດາຫຼັກຂໍ້ມູນທີ່ class="intro" ແລະ class="demo"
     
:first $("p:first") ຫຼັກຂໍ້ມູນ <p> ທໍາອິດ
:last $("p:last") ຫຼັກຂໍ້ມູນ <p> ສຸດທ້າຍ
:even $("tr:even") ບັນດາ <tr> ທີ່ແມ່ນຫຼັກສີໂຕ
:odd $("tr:odd") ບັນດາ <tr> ທີ່ແມ່ນຫຼັກສີບາຍ
     
:eq(index) $("ul li:eq(3)") ຫຼັກຂໍ້ມູນທີ່ສີ່ທີ່ຂອງລາຍການ (index ຈະເລີ່ມຈາກ 0)
:gt(no) $("ul li:gt(3)") ລາຍການບັນດາຫຼັກຂໍ້ມູນທີ່ index ຍັງກວ່າ 3
:lt(no) $("ul li:lt(3)") ລາຍການ ປະກອບ ທີ່ index ຕໍ່າກວ່າ 3
:not(selector) $("input:not(:empty)") ທຸກ input ທີ່ບໍ່ເປັນຖົງ
     
:header $(":header") ທຸກ ປະກອບ ຫົວຂໍ້ <h1> - <h6>
:animated   ທຸກ ປະກອບ ທີ່ມີການດາວນານ
     
:contains(text) $(":contains('W3School')") ທຸກ ປະກອບ ທີ່ມີສິ້ນສຸດທີ່ມີຂັ້ນຕົວ
:empty $(":empty") ທຸກ ປະກອບ ທີ່ບໍ່ມີລູກຊົງ
:hidden $("p:hidden") ທຸກ <p> ທີ່ບໍ່ສະແດງ
:visible $("table:visible") ທຸກ ຕາມຂໍ້ມູນທີ່ສາມາດເບິ່ງໄດ້
     
s1,s2,s3 $("th,td,.intro") ທຸກ ປະກອບ ທີ່ມີ ການເລືອກທີ່ຕົກລົງ
     
[attribute] $("[href]") ທຸກ ປະກອບ ທີ່ມີ ປະກອບ href
[attribute=value] $("[href='#']") ທຸກ ປະກອບ href ທີ່ແມ່ນ "#"
[attribute!=value] $("[href!='#']") ທຸກ ປະກອບ href ທີ່ບໍ່ແມ່ນ "#"
[attribute$=value] $("[href$='.jpg']") ທຸກ ປະກອບ href ທີ່ມີສິ້ນສຸດທີ່ '.jpg'
     
:input $(":input") ທຸກ <input> ທີ່
:text $(":text") ທຸກ <input> ທີ່ type="text"
:password $(":password") ທຸກ <input> ທີ່ type="password"
:radio $(":radio") ທຸກ <input> ທີ່ type="radio"
:checkbox $(":checkbox") ທຸກ <input> ທີ່ type="checkbox"
:submit $(":submit") ທຸກ <input> ທີ່ type="submit"
:reset $(":reset") ທຸກ <input> ທີ່ type="reset"
:button $(":button") ທຸກ <input> ທີ່ type="button"
:image $(':image') ສັບສົນ <input> ທີ່ type="image"
:file $(':file') ສັບສົນ <input> ທີ່ type="file"
     
:enabled $(':enabled') ສັບສົນ input ທີ່ຖືກປະຕິບັດ
:disabled $(':disabled') ສັບສົນ input ທີ່ຖືກລະງັບ
:selected $(':selected') ສັບສົນ input ທີ່ຖືກເລືອກ
:checked $(':checked') ສັບສົນ input ທີ່ຖືກເລືອກຢູ່

ບອກ

ວິນຍານ:ສັນຍາວິທະຍາ jQuery ຄວາມເລືອກສັບສົນ