easuUI之datebox日期选择框
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>DateBox(日期输入框)</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="../themes/default/easyui.css" type="text/css"></link> <link rel="stylesheet" href="../themes/icon.css" type="text/css"></link> <script type="text/javascript" src="../js/jquery.min.js"></script> <script type="text/javascript" src="../js/jquery.easyui.min.js"></script> <script type="text/javascript" src="../js/easyui-lang-zh_CN.js"></script> </head> <body> 入职时间: <input id="dd" type="text"/> <script type="text/javascript"> $("#dd").datebox({ required : true }); </script> <script type="text/javascript"> $("#dd").datebox({ onSelect : function(mydate){ var year = mydate.getFullYear(); var month = mydate.getMonth() + 1; var date = mydate.getDate(); alert(year+ "年" + month + "月" + date + "日"); } }); </script> </body> </html>
最后,关注【码上加油站】微信公众号后,有疑惑有问题想加油的小伙伴可以码上加入社群,让我们一起码上加油吧!!!