Input Date stepDown() method
Definition and usage
stepDown()
The method decreases the value of the date field by the specified number.
This method only affects the day (and not the month and year).
Tip:To increase the value, please use stepUp() method。
instance
example 1
reduce the value of the date field by 5 days:
document.getElementById("myDate").stepDown(5);
example 2
subtract one day (default):
document.getElementById("myDate").stepDown();
النحو
inputdateObject.stepDown()number)
قيمة الم 参数
الم参数 | الوصف |
---|---|
number |
مطلوب. يحدد عدد الأيام التي يجب طرحها من حقل التاريخ. إذا تم تمريرها، يتم طرح "1" من عدد الأيام. |
تفاصيل التقنية
قيمة العودة:
لا يوجد قيمة العودة.
دعم المتصفح
رقم في الجدول هو إصدار المتصفح الذي يدعم الخاصية بشكل كامل.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
الدعم | 12.0 | 17.0 | الدعم | الدعم |