jquery页面初始化控件时间

this.InitControlTime = function () {

if ($("#txt_Id_").val() == "") {
var today = new Date();
$("#form1").find(".datacontrol").each(function (i, value) {
var field = $(value).attr("name");
if (field != null) {
if ($(value).attr("onclick") == "WdatePicker()") {

$(value).val(today.getFullYear() + "-" + (today.getMonth() + 1) + "-" + today.getDate());
}

}
});

}

};

posted on 2015-07-28 17:38  听哥哥的话  阅读(272)  评论(0编辑  收藏  举报

导航