zoukankan      html  css  js  c++  java
  • JQUERY UI Datepicker Demo

    datepicker_demo.htm

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Date Picke Demo</title>
    <script type="text/javascript" src="jquery-1.8.1.js"></script>
    <script type="text/javascript" src="jquery-ui-1.8.23.custom.min.js"></script>
    <script type="text/javascript" src="test.js"></script>
    <script type="text/javascript">
    $(window).load(function() {
        var myBirthday = new Date(1981,08,05);
        //$("#dpBirthday").datepicker('setDate', myBirthday);    
    });
        function getDate(){
            alert($("#dpBirthday").val());
        }
    </script>
    </head>
    <body>
    <div>Birthday : <input type="text" id="dpBirthday" readonly="readonly"    style=" 80px;" />    </div>
    <div><input type="button" value="get date" onclick="getDate()"/></div>
    </body>
    </html>
    View Code

    test.js

    $(function() {
        $("#dpBirthday").datepicker({
            changeMonth : true,
            changeYear : true,
            dateFormat : 'yy-mm-dd'
        });
    });
    View Code
  • 相关阅读:
    jquery插件treetable使用
    WPF界面按钮美化
    Nginx配置
    Spring Framework之AOP
    IOS抓取与反抓取
    Spring Framework之事务管理
    68- 二叉树的最近公共祖先
    Spring Framework之IoC容器
    应试教育引发的思考
    春季实习生校园招聘总结
  • 原文地址:https://www.cnblogs.com/BenWong/p/4755367.html
Copyright © 2011-2022 走看看