1234567891011121314151617181920<!DOCTYPE html>charset="utf-8"W3Cschool教程(w3cschool.cn)id="demo"单击按钮显示给定时间的年份(UTC)onclick="myFunction()"点我function myFunction(){var d = new Date("July 21, 1983 01:15:00");var x = document.getElementById("demo");x.innerHTML=d.getUTCFullYear();}