清空按钮功能实现

html:
<button type="button" class="btn green" onclick="resetValues()">清空</button>


js:
<script>
function  resetValues() {
            $('#costTime1').val("");
            $('#costTime2').val("");
            $('#costTime3').val("");
            $('#costTime4').val("");
        }
</script>
 
costTime1 :元素id







猜你喜欢

转载自fengxiaoshuang429201406254717.iteye.com/blog/2418426