运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <h2>Use select() to select the content of a Week Field</h2> Week: <input type="week" id="myWeek" value="2014-W15"> <p>Click the button to select the content of the week field.</p> <button type="button" onclick="myFunction()">Try it</button> <script> function myFunction() { document.getElementById("myWeek").select(); } </script> </body> </html>