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>

 

posted on 2018-12-04 10:23  LoaderMan  阅读(181)  评论(0编辑  收藏  举报

导航