这个错误对我的时间选择器意味着什么?

发布于 2024-12-21 08:11:06 字数 1309 浏览 2 评论 0原文

当我使用特伦特·理查森的时间选择器时,有人知道来自我的错误控制台的这些错误意味着什么吗?我需要做什么?

未定义

$.timepicker在 jsfile 中

未定义

此行: $t.datepicker($.timepicker._newInst($t, o)._defaults); $.datepicker在 jsfile 中 此行: < code>$.datepicker._base_selectDate = $.datepicker._selectDate;

trent richardson 的 jsfile: http://trentrichardson.com/examples/timepicker/js/jquery-ui -timepicker-addon.js

我的js文件已链接:

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

<script type="text/javascript" src="jquery/jquery-1.7.min.js"></script>

<title>Prepare Questions and Answers</title>

<link rel="stylesheet" type="text/css" href="jquery/ui-lightness/jquery-ui-timepicker-addon.css"/>

<script type="text/javascript" src="jquery/jquery-ui-timepicker-addon.js"></script>

jquery代码:

$(function() {  

$('#answerdurationpicker').timepicker({
        timeFormat:'hh mm ss',
        hourGrid: 4,
        minuteGrid: 10,
        secondGrid: 10,
        showOn: 'button',
        buttonImage: "Images/clock.gif",
        buttonImageOnly: true
        });

        });

Does any body know what these errors coming from my error console mean while I am using trent richardson's timepicker? What do I need to do?

$.timepicker is undefined

this line in the jsfile: $t.datepicker($.timepicker._newInst($t, o)._defaults);

$.datepicker is undefined

this line in the jsfile: $.datepicker._base_selectDate = $.datepicker._selectDate;

trent richardson's jsfile: http://trentrichardson.com/examples/timepicker/js/jquery-ui-timepicker-addon.js

my jsfile has been linked :

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

<script type="text/javascript" src="jquery/jquery-1.7.min.js"></script>

<title>Prepare Questions and Answers</title>

<link rel="stylesheet" type="text/css" href="jquery/ui-lightness/jquery-ui-timepicker-addon.css"/>

<script type="text/javascript" src="jquery/jquery-ui-timepicker-addon.js"></script>

jquery code:

$(function() {  

$('#answerdurationpicker').timepicker({
        timeFormat:'hh mm ss',
        hourGrid: 4,
        minuteGrid: 10,
        secondGrid: 10,
        showOn: 'button',
        buttonImage: "Images/clock.gif",
        buttonImageOnly: true
        });

        });

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

∝单色的世界 2024-12-28 08:11:06

我认为您忘记包含 jqueryui,它是一个独立于 jquery 的库。您应该将其包含在基本 jquery 之后。您必须下载它并将代码修改为如下所示:

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="jquery/jquery-1.7.min.js"></script>
<link rel="stylesheet" href="jquery/jquery-ui.css" type="text/css" />
<script type="text/javascript" src="jquery/jquery-ui.min.js"></script>

<title>Prepare Questions and Answers</title>

<link rel="stylesheet" type="text/css" href="jquery/ui-lightness/jquery-ui-timepicker-addon.css"/>

<script type="text/javascript" src="jquery/jquery-ui-timepicker-addon.js"></script>

I think you forgot to include jqueryui, which is a separate library from jquery. You should include it right after base jquery. You'll have to download it and modify your code to something like this:

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="jquery/jquery-1.7.min.js"></script>
<link rel="stylesheet" href="jquery/jquery-ui.css" type="text/css" />
<script type="text/javascript" src="jquery/jquery-ui.min.js"></script>

<title>Prepare Questions and Answers</title>

<link rel="stylesheet" type="text/css" href="jquery/ui-lightness/jquery-ui-timepicker-addon.css"/>

<script type="text/javascript" src="jquery/jquery-ui-timepicker-addon.js"></script>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文