bootstraps
html:
<ul class="pager time1">
<li style=" 102px; "><a href="javascript:fs(false)">-</a></li>
<span id="start" name="arrivedate"> <script
type="text/JavaScript" type="text/javascript">
var dd = new Date();
var y = dd.getFullYear();
var m = dd.getMonth()+1;//获取当前月份的日期
var d = dd.getDate();
if(m<10){m="0"+m}
if(d<10){
d="0"+d;
}
var dd=y+"-"+m+"-"+d;
var obj=document.getElementById("start");
obj.innerHTML=dd;
$("#start").val(dd)
</script>
</span>
<li style=" 108px; "><a href="javascript:fs(true)">+</a></li>
</ul>
js:
<script type="text/javascript">
var i=0;
function fs(bol) {
if(bol){
i=i+1;
}else{
i=i-1;
}
var dd = new Date();
dd.setDate(dd.getDate()+i);//获取AddDayCount天后的日期
var y = dd.getFullYear();
var m = dd.getMonth()+1;//获取当前月份的日期
var d = dd.getDate();
if(m<10){m="0"+m}
if(d<10){
d="0"+d;
}
var dd=y+"-"+m+"-"+d;
var obj=document.getElementById("start");
obj.innerHTML=dd;
$("#start").val(dd)
}
</script>