Input type week property form in Javascript
The Input type week property form is a read only property that used to retrieve the reference of the form element that contain the week input field. It returns a reference to the form element that contain the form element, otherwise null.
Syntax
 1 <input>.form // to retrieve
input : An input type week element object to retrieve form property
Input week property form
 1 <!DOCTYPE html>
 2 <html>
 3 <style>
 4   .container {
 5     margin: 20px 0;
 6   }
 7 </style>
 8 <body>
 9 	<h1>The Input Week Object</h1>
 10 	<h2>Example</h2>
 11 	
 12 	<div class="container">
 13 	  <form>
 14 	    <input type="week" id="week" />
 15 	  </form>
 16 	</div>
 17 	<button onclick="access()">Access</button>
 18 		
 19 	<p id="result"></p>
 20 	<script>
 21 	function access() {
 22 	  const element = document.getElementById("week");
 23 	  const str = `The form has <b>${element.form.length}</b> elements`;
 24 	  document.getElementById("result").innerHTML = str;
 25 	}
 26 	</script>
 27 </body>
 28 </html>
Input week property form
Privacy Policy
Terms of Service
Disclaimer
Contact us
About us