JQuery Mobile中的Datepicker不起作用 [英] Datepicker in JQuery Mobile is not working

查看:159
本文介绍了JQuery Mobile中的Datepicker不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Jquery手机的新手,我添加了一个日期选择器到我的视图



我添加了插件,我的代码是

 < head> 
< link rel =stylesheethref =http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css>
< link href =http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css =stylesheet>
< link href =../../ docs / _assets / css / jqm-docs.css =stylesheet>
< link rel =stylesheethref =jquery.ui.datepicker.mobile.css/>
< script src =http://code.jquery.com/jquery-1.8.3.min.js>< / script>
< script>

$(document).bind(mobileinit,function(){
$ .mobile.page.prototype.options.degradeInputs.date = true;
});
< / script>
< script src =http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js>< / script>
< script src =jQuery.ui.datepicker.js>< / script>
< script src =jquery.ui.datepicker.mobile.js>< / script>

< / head>

是否有任何错误?



我遵循本教程,
http://jquerymobile.com /demos/1.0a4.1/experiments/ui-datepicker/

解决方案

将代码与< a href =http://jquerymobile.com/demos/1.0a4.1/experiments/ui-datepicker/ =nofollow>查看来源:mobile日期链接。



您刚刚从源代码中复制代码



他们的文件夹中包含以下文件, >您无法访问

 < script src =jQuery.ui.datepicker.js >< / script> 
< script src =jquery.ui.datepicker.mobile.js>< / script>

将这些文件下载到本地机器并进行访问。

 < script type =text / javascriptsrc =/这些文件的路径/> 


I'm a newbie to Jquery mobile, and i added a date picker in to my view

I added the plugins and my code is

 <head>
 <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css">
 <link href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css"rel="stylesheet">
<link href="../../docs/_assets/css/jqm-docs.css" rel="stylesheet">
<link rel="stylesheet" href="jquery.ui.datepicker.mobile.css" /> 
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>  
<script>

 $( document ).bind( "mobileinit", function(){
  $.mobile.page.prototype.options.degradeInputs.date = true;
 });    
 </script>
 <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<script src="jQuery.ui.datepicker.js"></script>
<script src="jquery.ui.datepicker.mobile.js"></script>

 </head> 

Is there any error on this?

I follow this tutorial, http://jquerymobile.com/demos/1.0a4.1/experiments/ui-datepicker/

解决方案

On comparing your code with the view source: of mobile datepicker link.

You have just copied the code from their source

They have these below files in their folder, which can't be accessed by you

<script src="jQuery.ui.datepicker.js"></script>
<script src="jquery.ui.datepicker.mobile.js"></script>

Download these files to your local machine and access it.

<script type="text/javascript" src="/path to these files" />

这篇关于JQuery Mobile中的Datepicker不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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