如何使用jQuery单击文本框来显示日历?

时间:2013-07-11 10:15:14

标签: javascript jquery

我有一个文本框和一个提交按钮。单击文本框时,将显示日历。 我的问题是,下面的代码有css或js文件,其中包含Http等的url。我希望我的系统上的css或js文件来自以下链接,因为我正在使用IBM RAD并且无法使用外部文件。 所以,请帮助我。

<!doctype html> 
<html lang="en">
    <head> 
        <meta charset="utf-8" /> 
        <title>jQuery UI Datepicker - Restrict date range</title> 
        <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />  
        <script src="http://code.jquery.com/jquery-1.9.1.js"></script> 
        <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> 
        <link rel="stylesheet" href="/resources/demos/style.css" />
        <script>
            $(function() {
                $("#datepicker").datepicker({ 
                    minDate: "-6M ", 
                    maxDate: -60 
                }); 
            });  
        </script>
    </head>
    <body> 
        <p>Date: <input type="text" id="datepicker" /></p>  
    </body>
</html>

3 个答案:

答案 0 :(得分:1)

您正在从CDN访问jQuery和jQuery UI。

相反,您可以下载jQueryjQuery UI并使用本地文件系统中的这些文件。

答案 1 :(得分:0)

只需转到链接, 1.打开crome浏览器中的链接, 2.只是说CTRL + S,(另存为)然后点击保存按钮到你的工作目录, 3.相应地更改链接。

答案 2 :(得分:0)

  

右键单击您的网页,然后转到“查看页面源”。然后您将看到图像中显示的屏幕。您可以通过点击它们来下载所有文件。复制并将它们添加到您的项目中。enter image description here

相关问题