在 asp.net 中使用 Javascript 进行时间选择器控制
Using Javascript in asp.net for timepicker control
我正在尝试使用这个 TimePicker 控件 http://trentrichardson.com/examples/timepicker/ 但我是网络编程的新手,所以我需要一些帮助,
到目前为止我有这个但是没有用
<script src="../Scripts/jquery-ui-timepicker-addon.js"></script>
<link href="../Content/css/jquery-ui-timepicker-addon.css" rel="stylesheet" />
<asp:UpdatePanel ID="upEdit" runat="server">
<ContentTemplate>
<div class="modal-body">
<table class="table">
<tr>
<td><input type="text" name="basic_example" id="basic_example" class="hasDatepicker" >
<script type="text/javascript">
function timepic() {
$('#basic_example').timepicker(
$.timepicker.regional['es'])
};
</script>
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
我做错了什么?感谢帮助
将您的 javascript 函数更改为,
$(document).ready(function() {
$('#basic_example').timepicker(
$.timepicker.regional['es'])
});
在页尾添加。
我正在尝试使用这个 TimePicker 控件 http://trentrichardson.com/examples/timepicker/ 但我是网络编程的新手,所以我需要一些帮助,
到目前为止我有这个但是没有用
<script src="../Scripts/jquery-ui-timepicker-addon.js"></script>
<link href="../Content/css/jquery-ui-timepicker-addon.css" rel="stylesheet" />
<asp:UpdatePanel ID="upEdit" runat="server">
<ContentTemplate>
<div class="modal-body">
<table class="table">
<tr>
<td><input type="text" name="basic_example" id="basic_example" class="hasDatepicker" >
<script type="text/javascript">
function timepic() {
$('#basic_example').timepicker(
$.timepicker.regional['es'])
};
</script>
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
我做错了什么?感谢帮助
将您的 javascript 函数更改为,
$(document).ready(function() {
$('#basic_example').timepicker(
$.timepicker.regional['es'])
});
在页尾添加。