0

i use this code in master page:

<script src="Scripts/jquery.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.cycle.all.js" type="text/javascript"></script>

<script type="text/javascript">
    $(document).ready(function () {
        $('#zome').cycle({
            fx: 'zoom',
            sync: false,
            delay: -2000
        });
     })
</script>

and i have default page and admin page: Default.aspx and Admin/Admin.aspx

javascript working in Default page but this code not working in admin page. plaes help me for path address in script.

i check this address, but is not ok!

/Scripts/jquery.min.js
And
~/Scripts/jquery.min.js
4

2 回答 2

0

您可以ResolveUrl在母版页中使用如下

 <script type="text/javascript" src='<%= ResolveUrl("~/Scripts/jquery.min.js")%>'></script>

<script src='<%= ResolveUrl("~/Scripts/jquery.cycle.all.js")%>' type="text/javascript"></script>
于 2013-05-30T07:34:25.950 回答
0

尝试:

<script language="javascript" src='<%# ResolveClientUrl("~/Scripts/MyScript.js")' type="text/javascript"/>

用您自己的文件/文件夹名称替换路径和文件名。

于 2013-05-30T07:24:25.307 回答