运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <body> <input type="week" id="myWeek" value="1995-W35"> <p>Click the button to get the week and year of the week field.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myWeek").value; document.getElementById("demo").innerHTML = x; } </script> </body> </html>