0

我在表 td 的单击事件上创建了 timepicker,因此用户可以在单击 td timepicker 显示时更改时间,更改时间后数据将使用 ajax 保存,timepicker 再次隐藏和正常 td 显示。

在 td timepicker 显示的那个 onclick 事件中,但我不能在这个 timepicker 上设置 onchange 事件或 onfocus out 事件

$(".starttime_text").click(function(){
            $(this).css("display", "none");
            $(this).siblings(".starttime_dd").css("display", "block");
        })

        $(function () {
        	$(".starttime").timepicker();
        	$('.starttime').on('changeTime', function() {
				var val = $('.starttime').text($(this).val());
				console.log($(this).val());
			});
        });
<td id="" class="td_text">
                    <span class="starttime_text" id=""><?php echo date('h:i',strtotime($['date'])) ?></span>
                    <span class="starttime_dd" style="display:none;">
                        <div class="input-group bootstrap-timepicker timepicker">
                                 <input type="text" class="form-control input-small starttime" size="35" value="<?php echo date('h:i',strtotime($customer['date'])); ?>">
                                 <span class="input-group-addon"><i class="glyphicon glyphicon-time"></i></span>
                              </div>
                    </span>
                </td>

任何人都可以在这方面帮助我...

4

1 回答 1

-2

define jquery cdn link $ is not defined表示未声明 jquery。

将他们的时间选择器 cdn 链接与 HTTP 请求一起使用,它将起作用。

于 2019-07-07T14:32:34.347 回答