---
title: "JS最简单的时间显示"
author: "maozj"
date: "2010-07-07T10:46:46Z"
tags: []
categories: ["Web前端"]
slug: "js"
draft: false
lastmod: "2010-07-07T10:46:46Z"
id: 707178
url: "https://maozj.iteye.com/blog/707178"
---

```html
<div id="ts">
</div>
<script>setInterval("ts.innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());",1000);
</script>

```


![](http://dl.iteye.com/upload/attachment/274125/7d613997-ad0a-3ef5-8335-3af699df0ab2.jpg)