<html>
<body>
<h2>Use select() to select the content of a Month Field</h2>
Month: <input type="month" id="myMonth" value="2014-05">
<p>Click the button to select the content of the month field.</p>
<button type="button" onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.getElementById("myMonth").select();
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_month_select by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 18:16:55 GMT -->
</html>