แปลงข้อความเป็นตัวเล็ก toLowerCase ตัวใหญ่ toUpperCase ด้วย javascript
13 February 2009Javascript Code
<script type="text/javascript">
function al(){
var hello_text="Welcome to Ninenik.com";
hello_text=hello_text.toLowerCase(); // ฟังก์ชันสำหรับแสดงตัวเล็ก
alert(hello_text);
}
function al2(){
var hello_text="Welcome to Ninenik.com";
hello_text=hello_text.toUpperCase(); // ฟังก์ชันสำหรับแสดงตัวใหญ่
alert(hello_text);
}
</script>
HTML code การใช้งาน
<button onclick="al()">แสดงตัวเล็ก</button> <button onclick="al2()">แสดงตัวใหญ่</button>
ตัวอย่าง
บทความคนเข้าอ่านวันนี้
18 Oct 08 การประยุกต์ใช้ฟังก์ขัน after() กับ text input อ่าน 4551 25 Sep 08 ไม่ให้ทำการ คัดลอก ( Copy ) และ วาง ( Paste ) อ่าน 2515 25 Sep 08 กรอกข้อมูลได้เฉพาะตัวเลข อ่าน 3675 05 Nov 08 แสดงป้ายโฆษณา banner แบบสุ่ม random ด้วย ajax อย่างง่าย อ่าน 4305 13 Oct 08 คำสั่ง SQL LIKE อ่าน 4447 12 Sep 10 จัดรูปแบบ NavigationControlOptions ใน Google Map อ่าน 1613 05 Jun 09 สร้างฟังก์ชัน แสดงการสุ่มเลือกตัวอักษร random ด้วย php อย่างง่าย อ่าน 2420 25 Sep 08 การจัดรูปแบบทศนิยมของตัวเลขใน javascript อ่าน 5587 02 Apr 11 การอ้างอิง object ในหน้าหลัก จากหน้า popup ด้วย jQuery อย่างง่าย อ่าน 2513 04 Oct 08 การติดตั้ง MySQL บน Windows อ่าน 2944 08 Dec 09 แปลง jQuery object เป็น DOM object อ่าน 2467 01 Feb 09 สร้างกล่องแจ้งข้อความ คล้าย MSN ด้วย jQuery อ่าน 5992 10 Sep 10 การแสดง ข้อมูลใน infowindows ของ google map ด้วย ajax ใน jQuery อ่าน 3205 04 Mar 09 ใช้ jQuery ย้ายค่าระหว่าง multiple list box อย่างง่าย อ่าน 6827 30 Nov 10 การนำเสนอ และแสดงข้อมูล ด้วย jQuery Flexigrid Plugin เบื้องต้น อ่าน 4160 09 Oct 10 สร้าง album และ อัพโหลด รูป photo ขึ้น facebook ด้วย php sdk อ่าน 3433 17 Oct 08 แสดงตัวอย่างรูป ก่อน upload image preview berfore upload อ่าน 8947 25 Sep 08 มารู้จัก effect ของ jquery อย่างง่าย ตอนที่ 1 อ่าน 6064 27 Dec 10 การสร้าง ajax dictionary จาก longdo ด้วย jQuery อ่าน 2679 02 Feb 10 หมุน สลับ แบนเนอร์ในแนวนอน ด้วย jQuery อย่างง่าย อ่าน 3454
