<input type="text" name="a" id="a" value="1" size="5"/>
<button type="button" style="width:30pxheight:22px" onclick="jia(1)">+</button>
日期:<input type="text" name="ri" id="ri" size="10"/>
<script>
function $(v){return document.getElementById(v)}
function jia(x){
var y=parseInt($("a").value)
if (x==0){y=y-1}else{y=y+1}
$("a").value=y
}
var d = new Date()
var str = d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate()
$("ri").value=str
</script>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)