Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <input type="week" id="myWeek" value="1995-W35"> <p>Click the button to change the default value of the week field.</p> <button type="button" onclick="myFunction()">Try it</button> <p><strong>Note:</strong> input elements with type="week" are not supported in Internet Explorer or Firefox.</p> <script> function myFunction() { document.getElementById("myWeek").defaultValue = "2014-W43"; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_week_defaultvalue by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:34:12 GMT --> </html>
Result:
Try it Yourself - © w3schools.com