源代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>享学课堂</title> </head> <body> <h1>JavaScript ISO 日期</h1> <p>Modify the time relative to UTC by adding +HH:MM or subtraction -HH:MM to the time.</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = new Date("2015-03-25T12:00:00-06:00"); </script> </body> </html>
运行结果