Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> JavaScript
JavaScript
  1. คุณสมบัติ Math.LOG2E ใน JavaScript

    คุณสมบัติ Math.LOG2E แทนค่า ลอการิทึมฐาน 2 ของ e (log₂e ≈ 1.4426950408889634) ไวยากรณ์ Math.LOG2E ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/javascript">     &nbs

  2. คุณสมบัติ Math.PI ใน JavaScript

    คุณสมบัติ Math.PI แทนค่า พาย (π) อัตราส่วนของเส้นรอบวงวงกลมต่อเส้นผ่านศูนย์กลาง ≈ 3.141592653589793 ไวยากรณ์ Math.PI ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/javascript">

  3. คุณสมบัติ Math.SQRT1_2 ใน JavaScript

    คุณสมบัติ Math.SQRT1_2 แทนค่า รากที่สองของ 1/2 (√½ = 1/√2 ≈ 0.7071067811865476) ไวยากรณ์ Math.SQRT1_2 ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/javascript">    

  4. คุณสมบัติ Math.SQRT2 ใน JavaScript

    คุณสมบัติ Math.SQRT2 แทนค่า รากที่สองของ 2 (√2 ≈ 1.4142135623730951) ไวยากรณ์ Math.SQRT2 ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/javascript">       var re

  5. ฟังก์ชัน Date.toUTCString() ใน JavaScript

    ฟังก์ชัน toUTCString() ของออบเจกต์ Date คืนค่า สตริงวันที่-เวลาในรูปแบบ UTC (GMT) ไวยากรณ์ dateObj.toUTCString() ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/javascript"> &nb

  6. ฟังก์ชัน Date.valueOf() ใน JavaScript

    ฟังก์ชัน valueOf() ของออบเจกต์ Date คืนค่า ค่า primitive ของวันที่ คือ จำนวนมิลลิวินาทีตั้งแต่ 1 มกราคม 1970 00:00:00 UTC (Unix timestamp) ไวยากรณ์ dateObj.valueOf() ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>   &nbs

  7. ฟังก์ชัน JSON.parse() ใน JavaScript

    ฟังก์ชัน JSON.parse() แปลง สตริง JSON ให้กลายเป็นค่า/ออบเจกต์ JavaScript ไวยากรณ์ JSON.parse(text[, reviver]) ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/javascript">  

  8. ฟังก์ชัน JSON.stringify() ใน JavaScript

    ฟังก์ชัน JSON.stringify() แปลงค่า JavaScript (object, array, primitive) ให้เป็น สตริง JSON เพื่อส่งผ่านเครือข่ายหรือเก็บในที่เก็บข้อมูล ไวยากรณ์ JSON.stringify(value[, replacer[, space]]) ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> &l

  9. ฟังก์ชัน Map.set() ใน JavaScript

    ฟังก์ชัน set() ของออบเจกต์ Map ใช้ เพิ่มหรืออัปเดต คู่คีย์-ค่า (key-value pair) ใน Map คืนค่า Map object เอง (ช่วยให้ chain ได้) ไวยากรณ์ mapObj.set(key, value) ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <

  10. คุณสมบัติ Map.size ใน JavaScript

    คุณสมบัติ size ของออบเจกต์ Map คืนค่า จำนวนคู่คีย์-ค่า ที่อยู่ใน Map ปัจจุบัน (เป็นค่า read-only) ไวยากรณ์ mapObj.size ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/javascript"&g

  11. ฟังก์ชัน Map.clear() ใน JavaScript

    ฟังก์ชัน clear() ของออบเจกต์ Map ลบ ทุกรายการ ออกจาก Map ทำให้ขนาด (size) กลายเป็น 0 ไวยากรณ์ mapObj.clear() ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/javascript">  

  12. ฟังก์ชัน Map.delete() ใน JavaScript

    ฟังก์ชัน delete() ของออบเจกต์ Map รับคีย์ (key) และลบคู่คีย์-ค่าที่ตรงกันออกจาก Map คืนค่า true หากลบสำเร็จ, false หากไม่พบคีย์ ไวยากรณ์ mapObj.delete(key) ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <scri

  13. ฟังก์ชัน Map.entries() ใน JavaScript

    ฟังก์ชัน entries() ของออบเจกต์ Map คืนค่า Iterator object ที่มีคู่คีย์-ค่า (key-value pairs) ทั้งหมดใน Map ตามลำดับที่เพิ่มเข้าไป ไวยากรณ์ mapObj.entries() ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <scri

  14. ฟังก์ชัน Map.forEach() ใน JavaScript

    ฟังก์ชัน forEach() ของออบเจกต์ Map ใช้วนลูปผ่านคู่คีย์-ค่า (key-value pairs) ทั้งหมดใน Map และเรียกใช้ฟังก์ชัน callback สำหรับแต่ละคู่ ไวยากรณ์ mapObj.forEach(callbackFn[, thisArg]) ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body

  15. ฟังก์ชัน Date.setUTCMonth() ใน JavaScript

    ฟังก์ชัน setUTCMonth() ของออบเจกต์ Date รับจำนวนเต็มแทนเดือนของปี (0-11) และแทนที่ค่าเดือนในวันที่ปัจจุบันด้วยค่านั้น ตามเวลาสากล (UTC) โดย 0 = มกราคม, 11 = ธันวาคม ไวยากรณ์ dateObj.setUTCMonth(month); ตัวอย่าง <html> <head>    <title>JavaScript Example</title> &l

  16. ฟังก์ชัน Date.setUTCSeconds() ใน JavaScript

    ฟังก์ชัน setUTCSeconds() ของออบเจกต์ Date รับจำนวนเต็มแทนวินาที และแทนที่ค่าวินาทีในวันที่ปัจจุบันด้วยค่านั้น ตามเวลาสากล (UTC) ไวยากรณ์ dateObj.setUTCSeconds(seconds); ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>   &

  17. ฟังก์ชัน Date.toDateString() ใน JavaScript

    ฟังก์ชัน toDateString() ของออบเจกต์ Date คืนค่า ส่วนของวันที่ (ไม่รวมเวลา) ในรูปแบบสตริงที่อ่านง่าย ไวยากรณ์ dateObj.toDateString(); ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/java

  18. ฟังก์ชัน Date.toISOString() ใน JavaScript

    ฟังก์ชัน toISOString() ของออบเจกต์ Date คืนค่า รูปแบบ ISO 8601 แบบลดรูป ของวันที่ (เสมอเป็น UTC) ไวยากรณ์ dateObj.toISOString(); ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/javascri

  19. ฟังก์ชัน Date.toJSON() ใน JavaScript

    ฟังก์ชัน toJSON() ของออบเจกต์ Date คืนค่า รูปแบบ ISO 8601 แบบลดรูป (Simplified Extended ISO Format) ของวันที่ ไวยากรณ์ dateObj.toJSON(); ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>    <script type="text/

  20. ฟังก์ชัน Date.toLocaleDateString() ใน JavaScript

    ฟังก์ชัน toLocaleDateString() ของออบเจกต์ Date คืนค่า ส่วนของวันที่ (ไม่รวมเวลา) ตามรูปแบบ locale ของผู้ใช้ ไวยากรณ์ dateObj.toLocaleDateString([locales[, options]]) ตัวอย่าง <html> <head>    <title>JavaScript Example</title> </head> <body>   &nbs

Total 5941 -คอมพิวเตอร์  FirstPage PreviousPage NextPage LastPage CurrentPage:183/298  20-คอมพิวเตอร์/Page Goto:1 177 178 179 180 181 182 183 184 185 186 187 188 189