x
1
2
<html>
3
<body>
4
5
<p id="demo">Click the button to display the date after changing the month and day.</p>
6
7
<button onclick="myFunction()">Try it</button>
8
9
<script>
10
function myFunction() {
11
var d = new Date();
12
d.setUTCMonth(4, 20);
13
var x = document.getElementById("demo");
14
x.innerHTML = d;
15
}
16
</script>
17
18
</body>
19
</html>