JS基础知识点(5)——特殊字符&&date对象
原创特殊字符:
“”:双引号
:单引号
\:转义字符
例如:输出路径
\r:回车
\n:换行
date对象:

方法:
getFullYear()/setFullYear():获得/设置年份
getMonth();获得
getData(),获得的日期;
getHourses();获得小时;
getMinutes();获得分钟;
getSeconds(),获得的秒数;
getDay();获得周;
getTime();获得时间戳;1970年开始到data的毫秒值(通常是没有设置)
实例:
计算从一出生多少天过去了:
版权声明
所有资源都来源于爬虫采集,如有侵权请联系我们,我们将立即删除
相关文章
最新文章
- Google Embraces Geothermal Technology to Vaporize Rock for Clean Power 14分钟前
- Microsoft's Agent Framework PyPI package compromised to steal credentials 1小时前
- Nvidia's Seven Billionaires Have Lost a Third of Their Wealth 1小时前
- Stabyourself.net Games 2小时前
- 【IT 早报】2026年11月19日 - 本周要闻与趋势 2小时前
- 从均匀平铺到自适应路由:RINs 如何让扩散生成提速 10 倍? 3小时前
- Claude Code makes a finished subagent send its report twice (70-second repro) 3小时前
- Becerra faces a $2B budget deficit as potential AI bust looms 3小时前
- Show HN: Agent Hive – cute Grokbot like agentic teams with queen and many bees 4小时前
- Show HN: Lazycow Studio – turns footage you never edited into reels, locally 4小时前
itfan123


