首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

小tips:jquery datapicker中,用图片旋钮弹出日历框

2012-11-14 
小tips:jquery datapicker中,用图片按钮弹出日历框在jquery datapicker中,如果要在日历框旁边的小图片,当

小tips:jquery datapicker中,用图片按钮弹出日历框
在jquery datapicker中,如果要在日历框旁边的小图片,当点小图片时,
弹出日历框,可以这样写:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet"
    href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/base/jquery-ui.css"
        type="text/css" media="all" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"
    type="text/javascript"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js"
        type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {

            $('#<%= txtDate.ClientID  %>').datepicker({
                buttonImage: '../../images/icons/calendar.png',
                buttonImageOnly: true,
                showOn: 'button'
            });
        });

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:TextBox ID="txtDate" runat="server"></asp:TextBox>
    </form>
</body>
</html>

热点排行