การกำหนด selectors ด้วย jQuery เกี่ยวกับ form
รูปแบบที่ 1 $(":input");
ใช้ในการเลือก element ได้แก่ input , textarea , select และ button
ใช้ในการเลือก input element ที่มี type เท่ากับ text
ใช้ในการเลือก input element ที่มี type เท่ากับ password
ใช้ในการเลือก input element ที่มี type เท่ากับ radio
ใช้ในการเลือก input element ที่มี type เท่ากับ checkbox
ใช้ในการเลือก input element ที่มี type เท่ากับ submit
ใช้ในการเลือก input element ที่มี type เท่ากับ image
ใช้ในการเลือก input element ที่มี type เท่ากับ reset
ใช้ในการเลือก button และ input element ที่มี type เท่ากับ button
ใช้ในการเลือก input element ที่มี type เท่ากับ file
ใช้ในการเลือก element ที่เป็น hidden หรือ input element ที่มี type เท่ากับ hidden
04 Nov 08
การจำกัดจำนวนตัวอักษร ใน textarea ด้วย jquery อ่าน 1541
16 Nov 08
jQuery กับการจำกัดการเลือก checkbox อ่าน 1504
26 Feb 09
การกำหนดให้ input text เลื่อนโฟกัส focus เองอัตโนมัติ ด้วย jQuery อ่าน 1502
26 Mar 09
แสดงข้อความบนรูปภาพพื้นหลังสีจางด้วย CSS และ jQuery อ่าน 1483
17 Aug 09
สร้างเมนู เทคนิค ลูกตาปลา ด้วย jQuery อย่างง่าย อ่าน 1451
22 Nov 08
ซ่อนและแสดงเนื้อหาแบบหีบเพลง (accordion) ด้วย jquery อย่างง่าย อ่าน 1439
25 Sep 08
ตัวอย่างการใช้งานฟังก์ชันของ jQuery ในการเรียกใช้ Class ใน CSS อ่าน 1415
25 Sep 08
jquery สคริปแรกของคุณ อ่าน 1406
02 Apr 09
สร้างรายการตัวเลือกให้กับ input text ด้วย jQuery อย่างง่าย อ่าน 1402
25 Sep 08
ซ่อนและแสดง เนื้อหาด้วย jquery แบบ Basic อ่าน 1395
19 Feb 09
สร้างกล่อง alert ข้อความเฉพาะตัว ด้วย jQuery และ CSS อย่างง่าย อ่าน 1357
15 Feb 09
สร้างเมนู Accordion อย่างง่ายแบบที่ 2 ด้วย jQuery อ่าน 1291
04 Feb 09
แก้ไขข้อความแบบทันที ด้วย jQuery อ่าน 1272
25 Sep 08
มารู้จัก effect ของ jquery อย่างง่าย ตอนที่ 3 อ่าน 1264
25 Sep 08
การกำหนด Selectors ด้วย jquery แบบ Basic อ่าน 1240
ใช้ในการเลือก element ได้แก่ input , textarea , select และ button
<script language="javascript">
$(function(){
$(":input").css("backgroundColor","red");
});
</script>
รูปแบบที่ 2 $(":text");ใช้ในการเลือก input element ที่มี type เท่ากับ text
<script language="javascript">
$(function(){
$(":text").css("backgroundColor","red");
});
</script>
รูปแบบที่ 3 $(":password"); ใช้ในการเลือก input element ที่มี type เท่ากับ password
<script language="javascript">
$(function(){
$(":password").css("backgroundColor","red");
});
</script>
รูปแบบที่ 4 $(":radio");ใช้ในการเลือก input element ที่มี type เท่ากับ radio
<script language="javascript">
$(function(){
$(":radio").css("backgroundColor","red");
});
</script>
รูปแบบที่ 5 $(":checkbox");ใช้ในการเลือก input element ที่มี type เท่ากับ checkbox
<script language="javascript">
$(function(){
$(":checkbox").css("backgroundColor","red");
});
</script>
รูปแบบที่ 6 $(":submit"); ใช้ในการเลือก input element ที่มี type เท่ากับ submit
<script language="javascript">
$(function(){
$(":submit").css("backgroundColor","red");
});
</script>
รูปแบบที่ 7 $(":image"); ใช้ในการเลือก input element ที่มี type เท่ากับ image
<script language="javascript">
$(function(){
$(":image").css("backgroundColor","red");
});
</script>
รูปแบบที่ 8 $(":reset"); ใช้ในการเลือก input element ที่มี type เท่ากับ reset
<script language="javascript">
$(function(){
$(":reset").css("backgroundColor","red");
});
</script>
รูปแบบที่ 9 $(":button"); ใช้ในการเลือก button และ input element ที่มี type เท่ากับ button
<script language="javascript">
$(function(){
$(":button").css("backgroundColor","red");
});
</script>
รูปแบบที่ 10 $(":file"); ใช้ในการเลือก input element ที่มี type เท่ากับ file
<script language="javascript">
$(function(){
$(":file").css("backgroundColor","red");
});
</script>
รูปแบบที่ 11 $(":hidden"); ใช้ในการเลือก element ที่เป็น hidden หรือ input element ที่มี type เท่ากับ hidden
<script language="javascript">
$(function(){
$(":hidden").css("backgroundColor","red");
});
</script>

