HTML DOM Input Time step প্রপার্টি কেবল সেকেন্ডের জন্য বৈধ ব্যবধান (legal intervals) নির্ধারণ করে।
সিনট্যাক্স (Syntax)
সংখ্যা মান পাওয়ার জন্য (Returning number value)
inputTimeObject.step
step অ্যাট্রিবিউট সংখ্যায় সেট করার জন্য (Setting step attribute to a number value)
inputTimeObject.step = number
প্যারামিটার (Parameters)
প্যারামিটার সংখ্যা মান:
| seconds | বৈধ মান হলো সেগুলো যা ৬০ কে সম্পূর্ণ ভাগ করে (যেমন: 10, 15, 20) |
উদাহরণ (Example)
Input Time step প্রপার্টির একটি উদাহরণ দেখুন:
<!DOCTYPE html>
<html>
<head>
<title>Input Time step</title>
<style>
form {
width:70%;
margin: 0 auto;
text-align: center;
}
* {
padding: 2px;
margin:5px;
}
input[type="button"] {
border-radius: 10px;
}
</style>
</head>
<body>
<form>
<fieldset>
<legend>Time-step</legend>
<label for="TimeSelect">Time: </label>
<input type="time" id="TimeSelect" step="2">
<input type="button" onclick="changeStep(20)" value="Step to 20">
<input type="button" onclick="changeStep(30)" value="Step to 30">
<div id="divDisplay"></div>
</fieldset>
</form>
<script>
var divDisplay = document.getElementById("divDisplay");
var inputTime = document.getElementById("TimeSelect");
divDisplay.textContent = 'The current step is: '+inputTime.step;
function changeStep(myStep) {
inputTime.step = myStep;
divDisplay.textContent = 'The current step is: '+inputTime.step;
}
</script>
</body>
</html>
আউটপুট (Output)
এটি নিম্নলিখিত আউটপুট তৈরি করবে:
"Step to 20" বাটনে ক্লিক করলে:

"Step to 30" বাটনে ক্লিক করলে:
