前卫目录网

日历代码 (日历代码html)


文章编号:123 / 更新时间:2024-12-29 18:31:15 / 浏览:
日历代码
星期一 星期二 星期三 星期四 星期五 星期六 星期日
Javascript // 获取当前时间 const now = new date();// 获取当前年月 const year = now.getFullYear(); const month = now.getMonth();// 创建日历表头 const tableHead = document.querySelector('thead'); const tableBody = document.querySelector('tbody');// 创建星期表头 for (let i = 0; i < 7; i++) {const th = document.createElement('th');th.textContent = ['星期一', '星期1; i <= 7; i++) {const td = document.createElement('td');td.textContent = '';tableBody.appendChild(td); }
相关标签: 日历代码html日历代码

本文地址:https://www.qianwe.com/article/b754dad5f0ecd5a3b43a.html

上一篇:JSP源代码下载jsp源代码的时间怎么修改...
下一篇:Javascript中的substring方法javascriptvoi...

发表评论

温馨提示

做上本站友情链接,在您站上点击一次,即可自动收录并自动排在本站第一位!
<a href="https://www.qianwe.com/" target="_blank">前卫目录网</a>