現(xiàn)在顯示的是?02天xx小時(shí)xx分???如何將天數(shù)前面的0去掉,當(dāng)時(shí)間不足24小時(shí)時(shí)天數(shù)和前面的數(shù)字隱藏?只顯示小時(shí)分鐘,怎么改
<div?style="width:100%;?height:?30px;?overflow:hidden">
????<div?style="?background-color:#ff6702;opacity:0.1;?width:100%;?height:30px;"></div>
????<div?style="position:?relative;?margin-top:-30px;?color:#999?">
????????????<p?style="text-align:?center;line-height:?30px;">
????????????????<a?id="remain-time"?data-remain="190000"?>190000</a>
????????????</p>
????</div>
</div>
$(function(){
????????var?remainTime?=?$("#remain-time").data("remain");
????????if?(remainTime?>?0)?{
????????????var?final?=?new?Date().setTime(new?Date().getTime()?+?remainTime?*?1000);
????????????$('#remain-time').countdown(final,?function(event)?{
????????????????$(this).text(event.strftime('剩余時(shí)間:%D天%H小時(shí)%M分鐘%S秒'));
????????????}).on("finish.countdown",?function(){
????????????????$(this).text("債權(quán)已過期");
????????????});
????????}else{
????????????$('#remain-time').text("債權(quán)已過期");
????????}
- 1 回答
- 1 關(guān)注
- 1268 瀏覽
添加回答
舉報(bào)
0/150
提交
取消