BootWiki教程网
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>BootWiki 教程网</title> </head> <body> 周和年: <input id="myWeek" type="week"> <p>点击按钮设置 week 字段的年和周。</p> <button onclick="myFunction()">点我</button> <p id="demo"></p> <script> function myFunction() { document.getElementById("myWeek").value = "2014-W48"; } </script> </body> </html>
运行结果