html 重置表单

 

//清空表单

$('#SearchForm').form('clear');
var fdate = (new Date().getFullYear()) + "-" + (new Date().getMonth() + 1) + "-" + (new Date().getDate() - 7);
var tdate = (new Date().getFullYear()) + "-" + (new Date().getMonth() + 1) + "-" + (new Date().getDate());

//给表单的控件赋值, 

$('#formID').form('load', {

//控件name:值

ctlName1: "value",
ctlName2: "-1",
ctlName3: fdate ,
ctlName4: tdate ,
ctlName5: "  ",
});

posted @ 2016-09-30 14:31  人生为卒  阅读(641)  评论(0编辑  收藏  举报