2020/10/20

一.

<script>
document.write(Date());
</script>

输出北京时间‘

 

<button onclick="myFunction()">时间</button>
<script>
function myFunction()
{
    document.write(Date());
}
</script>

当点击时间按钮时会出现时间   干货爱我好吗

 

使用 console.log() 方法在浏览器中显示 JavaScript 值

<script>
a = 8;
b = 6;
c = a + b;
console.log(c);
</script>

二.使用scrip输出时间

三.scrip

 

posted @ 2020-10-20 18:56  小强哥in  阅读(13)  评论(0编辑  收藏  举报