补零补零
Posted jayruan
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了补零补零相关的知识,希望对你有一定的参考价值。
var _ = [‘00‘, ‘01‘, ‘02‘, ‘03‘, ‘04‘, ‘05‘, ‘06‘, ‘07‘, ‘08‘, ‘09‘], //补零
d = new Date(),
h = d.getHours(),
m = d.getMinutes(),
s = d.getSeconds();
return [_[h] || h, _[m] || m, _[s] || s].join(":");
======
1,this[监听器的对象]
2,event.target[当前目标对象]
<ul onclick="test()">
<li></li>
</ul>
1,你按那里都是:
<ul onclick="test()">
<li></li>
</ul>
2,他可能是ul or li
以上是关于补零补零的主要内容,如果未能解决你的问题,请参考以下文章