代码示例:(标识:eg_js_date_toutcstring)
<!DOCTYPE html>
<html>
<body>

<h2>JavaScript Date()</h2>

<p>toUTCString() 方法将日期转换为 UTC 字符串(日期显示标准):</p>

<p id="demo"></p>

<script>
var d = new Date();
document.getElementById("demo").innerHTML = d.toUTCString();
</script>

</body>
</html>
运行结果: