在asp.net中没有读取jquery函数 [英] jquery function not read in asp.net
问题描述
大家好,
我正在为我的项目使用包含子页面的母版页。
对于子页面中的datepicker,我正在尝试使用jquery插件。
在调试中我发现读取jquery源代码后的代码,函数根本没有读取并且光标移动到vb中的卸载事件。
我正在使用子页面标题中的代码。
所以尽管他们没有错误消息,但是datepicker不能正常工作。
我在一个网页项目中使用了类似的代码并且工作正常。
请建议。谢谢!
代码:
< header>
< ; link rel =stylesheethref =<%= ResolveUrl(〜/ Scripts / jquery-ui-1.11.1.datepicker / jquery-ui.css)%>/>
< script src =<%= ResolveUrl(〜/ Scripts / jquery-1.11.1.js)%>>< / script>
< script src =<%= ResolveUrl(〜/ Scripts / jquery-ui-1.11.1.datepicker / jquery-ui.js)%>>< / script>
*****< script type =text / javascript>
$(function(){
$(#txtTargetDate)。datepicker( {dateformat:dd-mm-yy});
$(#txtTargetDate)。datepicker(option,dateFormat,dd-mm-yy);
});
< / script>
< / header>
(function(){
(#txtTargetDate)。datepicker({dateformat:dd-mm-yy});
(#txtTargetDate)。datepicker(option,dateFormat,dd-mm-yy);
});
< / script>
< / header>
Hi All,
I am using master pages with child pages for my project.
For a datepicker in child page i am trying to use jquery plugin.
In debugging i found that the code after reading the jquery source lines, function is not read at all and the cursor moves to unload event in vb.
I am using the code in header of child page.
So though their is no error message but the datepicker is not working.
I have used similar code in a single webpage project and it worked fine.
Pls suggest. thanks!
The code:
<header>
<link rel="stylesheet" href="<%=ResolveUrl("~/Scripts/jquery-ui-1.11.1.datepicker/jquery-ui.css")%>"/>
<script src="<%=ResolveUrl("~/Scripts/jquery-1.11.1.js")%>"></script>
<script src="<%=ResolveUrl("~/Scripts/jquery-ui-1.11.1.datepicker/jquery-ui.js")%>"></script>
***** <script type="text/javascript">
$(function () {
$("#txtTargetDate").datepicker({ dateformat: "dd-mm-yy" });
$("#txtTargetDate").datepicker("option", "dateFormat", "dd-mm-yy");
});
</script>
</header>
(function () {
("#txtTargetDate").datepicker({ dateformat: "dd-mm-yy" });
("#txtTargetDate").datepicker("option", "dateFormat", "dd-mm-yy");
});
</script>
</header>
这篇关于在asp.net中没有读取jquery函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!