ป้อนข้อมูลเดือนstepDown()วิธี การ
ตัวอย่าง
ลดค่าของฟิลด์เดือน 3 เดือน:
document.getElementById("myMonth").stepDown(3);
ความหมายและการใช้งาน
ขั้นตอน stepDown() จะลดค่าของฟิลด์เดือนด้วยตัวเลขที่ระบุ
วิธีนี้จะมีผลเฉพาะกับเดือน (ไม่ใช่ปี)
เคล็ดลับ:หากต้องการเพิ่มค่า ให้ใช้เมธอดstepUp()
รองรับเบราว์เซอร์
Method | |||||
---|---|---|---|---|---|
stepDown() | Yes | 12.0 | Not supported | Yes | Yes |
ไวยากรณ์
numberObject.stepDown(number)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
number | Required. Specifies the amount of months the month field should decrease. If omitted, the months are decremented by "1" |
รายละเอียดทางเทคนิค
คืนมูลค่า: | ไม่มีค่าส่งคืน |
---|
ตัวอย่างเพิ่มเติม
ตัวอย่าง
ลดค่าของฟิลด์เดือนลง 1 (ค่าเริ่มต้น):
document.getElementById("myMonth").stepDown();
❮ ใส่วัตถุเดือน