ช่วงอินพุตstepDown() Method
ตัวอย่าง
ลดค่าของตัวควบคุมตัวเลื่อนโดย "10":
document.getElementById("myRange").stepDown(10);
ความหมายและการใช้งาน
ขั้นตอน stepDown() จะลดค่าของการควบคุมตัวเลื่อนด้วยตัวเลขที่ระบุ
เคล็ดลับ:หากต้องการเพิ่มค่า ให้ใช้ เมธอดstepUp()
รองรับเบราว์เซอร์
Method | |||||
---|---|---|---|---|---|
stepDown() | Yes | 12.0 | Yes | Yes | Yes |
ไวยากรณ์
rangeObject.stepDown(number)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
number | Required. Specifies the amount the value of the slider control should decrease. If omitted, the value is decremented by "1" |
รายละเอียดทางเทคนิค
คืนมูลค่า: | ไม่มีค่าส่งคืน |
---|
ตัวอย่างเพิ่มเติม
ตัวอย่าง
ลดค่าของตัวควบคุมตัวเลื่อนโดย "1" (ค่าเริ่มต้น):
document.getElementById("myRange").stepDown();
❮ วัตถุช่วงอินพุต