本文介绍了内容页面中的Java脚本功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,我在母版页上使用计时器控件来显示时间,并且在内容页上运行良好.但是,当我在内容页面中编写Java脚本函数时,它不起作用.所有人的内容页面的代码详细信息已粘贴,以寻求解决方案.

Friends, I am using timer control at master page to show time and is working fine in content pages. But when I write java script function in the content page, it is not working. Code details of the content page have been pasted for solution from all of you.

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
 <script language="javascript">
        $(function PageLoad() {
            var $ds = $("div.s_show");
            $ds.hide().eq(0).show();
            var pcnt = $ds.length;
            setInterval(p_slider, 3000);
            function p_slider() {
                $ds.eq(($ds.length++) % pcnt)
                  .slideUp("slow", function () {
                      $ds.eq(($ds.length) % pcnt)
           .slideDown("slow");
                  });
            }
        });
    </script>





<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

 <div>
 <asp:Panel ID="p1" runat="server" ClientIDMode="Static" class='s_show' BackColor="#CC3399"

        BorderColor="#FF6699" BorderStyle="Groove" BorderWidth="5px" Width="300px">
Hiiiiiiii It's Panel One Good Day!!!!!
<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Image2.jpg" Width="300"></asp:Image>
</asp:Panel>
<asp:Panel ID="p2" runat="server" ClientIDMode="Static" class='s_show' BackColor="#9999FF"

        BorderColor="#006666" BorderStyle="Groove" BorderWidth="5px" Width="300px">
Hiiiiiiiii It's Panel Two Good Luck!!!!
<asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Image1.jpg" Width="300px"></asp:Image>
</asp:Panel>




等待快速响应,谢谢朋友....




Waiting for quick response, thank you friends....

推荐答案




这篇关于内容页面中的Java脚本功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 20:49