HTML DOM Input Week form प्रॉपर्टी इनपुट वीक के लिए समाहित करने वाले फॉर्म का रेफरेंस लौटाती है।
सिंटैक्स
निम्नलिखित सिंटैक्स है:
form ऑब्जेक्ट का रेफरेंस प्राप्त करना:
inputWeekObject.form
उदाहरण
आइए Input Week form प्रॉपर्टी का एक उदाहरण देखें:
<!DOCTYPE html> <html> <head> <title>Input Week form</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 id="Mid-Term">
<fieldset>
<legend>Week-form</legend>
<label for="WeekSelect">Examination Week: <input type="week" id="WeekSelect" value="2019-W36"> </label>
<input type="button" onclick="showExamination()" value="What exams are in this week? ">
<div id="divDisplay"></div>
</fieldset>
</form>
<script>
var divDisplay = document.getElementById("divDisplay");
var inputWeek = document.getElementById("WeekSelect");
function showExamination() {
divDisplay.textContent = 'Examinations: '+inputWeek.form.id;
}
</script> </body> </html>
आउटपुट
यह निम्नलिखित आउटपुट उत्पन्न करेगा:
'What exams are in this week?' बटन पर क्लिक करने से पहले:

'What exams are in this week?' बटन चेक करने के बाद:
