node.js-DatePicker jQuery UI不起作用 [英] node.js - DatePicker jquery UI not workinng

查看:108
本文介绍了node.js-DatePicker jQuery UI不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的node.js项目中使用JQuery UI datepicker,但它不起作用.

I am trying to use JQuery UI datepicker in my node.js project and it doesn't work.

layout.ejs和index.ejs文件的简化版本.

My simplified version of layout.ejs and index.ejs files.

layout.ejs

layout.ejs

<head>
<script type="text/javascript" src="../1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="../1.8.11/jquery-ui.min.js"></script>
<link rel="stylesheet" href="../jquery-ui.css" type="text/css" media="all" />
</head>
<body>
      <script>
         $(function() {
            $( "#datepick" ).datepicker();
        });
     </script>
</body>
</html>

index.ejs

index.ejs

<aside class="widget">
    <p>Date: <input type="text" id="datepick"></p>
</aside>

推荐答案

工作演示 http: //jsfiddle.net/MfkAE/

再次检查您的脚本源,更好将其更改为google链接,如下所述;休息吧,您可以看到所有这些在带有正确来源的演示中都可以正常工作.

Check your scripts source again, better yet change it to google link as I mentioend below; rest you can see it all works fine in demo with riight source.

希望有帮助! :)

脚本

 <link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/smoothness/jquery-ui.css" media="all">

  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>

代码

$(document).ready(function() {
    $("#datepick").datepicker();
});​

这篇关于node.js-DatePicker jQuery UI不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆