【汇智学堂】-SpringMVC+Mybatis+Spring框架使用入门(垃圾分类商品管理新增功能前端界面JS)
作者:互联网
$(document).ready(function(){
$(".beginSelector").datepicker({
language: "zh-CN",
autoclose: true,
startView: 0,
format: "yyyy-mm-dd",
clearBtn:true,
todayBtn:false,
endDate:new Date(),
});
//年龄判断
$(document).on('change', '.fage', function (){
if( parseInt($(this).val()) > 150){
$(this).val('');
};
});
//日期验证
$(".datepicker").on("click",".day",function(){
var jdate = new Date();
var year = jdate.getFullYear().toString();
var moth = jdate.getMonth()+1 > 10?jdate.getMonth()+1:'0'+(jdate.getMonth()+1);
var day = jdate.getDate()<10?'0'+jdate.getDate():jdate.getDate();
var rdate = parseInt(year+moth+day);
});
});
//提交按钮事件
$(document).on('click', '#isubmit', function() {
window.parent.mshowmodify();
$("#fm1").submit();
});
标签:function,datepicker,val,SpringMVC,Spring,jdate,汇智,var,getMonth 来源: https://blog.csdn.net/weixin_39593940/article/details/91125539