所以clockpicker工作得很好,直到我添加了updatepanel,我知道脚本应该在标签之外,但仍然不能正常工作..这是我的代码:
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/highlight.min.js"></script>
<script src="dist/jquery-clockpicker.min.js"></script>
<script type="text/javascript">
$('.clockpicker').clockpicker();
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div id="schedule_div" runat="server" class="jumbotron" visible="false">
<table style="width: 100%;">
<tr>
<td style="width: 509px">
<div class="input-group clockpicker" data-placement="left" data-align="top" data-autoclose="true" style="left: 207px; top: 9px; width: 91px; height: 36px">
<asp:TextBox ID="TextBox1" class="form-control" value="13:14" Style="left: 5px; top: -20px; width: 202%" runat="server"></asp:TextBox>
</td>
</tr>
</table>
</div>
<br />
<br />
</ContentTemplate>
</asp:UpdatePanel>
答案 0 :(得分:1)
通过添加以下instide contenttemplate
来修复<script type="text/javascript" language="javascript">
Sys.Application.add_load(jScript);
</script>
jScript是函数名称