Javascript examples for DOM HTML Element:Input Week
The type property returns the type of form week field.
A String, representing the type of form element the week field is
The following code shows how to return which type of form element the week field is:
<!DOCTYPE html> <html> <body> <input type="week" id="myWeek"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w w w . jav a2 s . c o m*/ var x = document.getElementById("myWeek").type; document.getElementById("demo").innerHTML = x; } </script> </body> </html>