三元运算符及时间获取实例

前端之家收集整理的这篇文章主要介绍了三元运算符及时间获取实例前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<table class="html5"><tr class="li1">
<td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

xmlns> > > >js> >  function clock(){  var tt=new Date();        document.getElementById("time").innerHTML="您好,现在的时间是:"+tt.getHours()+":"+    (tt.getMinutes()?+tt.getMinutes:tt.getMinutes++tt.getSeconds<?+tt.getSeconds:tt.getSeconds; ,             >           > #time{ font-size:30px; font-weight:bold; color:#F63;}                                                             >         >                                           >   ><>   > >    

猜你在找的程序笔记相关文章