主题:  用JS刷新网页内容时遇到的问题。

kismet

职务:普通成员
等级:1
金币:0.0
发贴:15
#12004/12/13 15:23:48
执行iptv_channel_list()后,网页内容不能刷新,不知何故,还请各位老大指教!

var page_number = 0;
function iptv_channel_list()
{
    mpeg_open();
    document.write("<table border=\"0\" width=\"270\" height=\"266\" cellpadding=\"0\" cellspacing=\"0\">");
    document.write("<tr><td width=\"80\" height=\"23\"></td><td></td></tr>");
    page_list = 9 * page_number;
    for(i=page_list+1;i<=page_list+9;i=i+1)
    {
        if(i <= channel_amount)
        {
        document.write("<tr><td width=\"80\" height=\"27\"></td><td height=\"27\"><a href=\"javascript:iptv_show_mode()\" onfocus = \"javascript:iptv_play(\'"+ channel[i-1] +"\');\"><font color=\"#FFFFFF\">CHANNEL "+ i +"</font></a></td></tr>");
        }
    }

    document.write("<table border=\"0\" width=\"252\" height=\"46\" cellpadding=\"0\" cellspacing=\"0\">");
    document.write("<tr><td width=\"42\" height=\"10\"></td><td width=\"62\" height=\"10\"></td><td width=\"86\" height=\"10\" ></td><td width=\"62\" height=\"10\"></td></tr>");
    document.write("<tr>");
    document.write("<td width=\"42\" height=\"36\"></td>");
    document.write("<td width=\"62\" height=\"36\"><a href=\"javascript:list_change(\'subtract\')\"><img border=\"0\" src=\"image/page_left.jpg\" width=\"62\" height=\"36\"></a></td>");
    document.write("<td width=\"86\" height=\"36\"></td>");
    document.write("<td width=\"62\" height=\"36\"><a href=\"javascript:list_change(\'add\')\"><img border=\"0\" src=\"image/page_right.jpg\" width=\"62\" height=\"36\"></a></td>");
    document.write("</tr>");
    document.write("</table>");

}


function list_change(order)
{
    mpeg_open();
    page = parseInt((channel_amount-1)/9);
    if(order == "subtract")
        page_number = page_number - 1;
    if(order == "add")
        page_number = page_number + 1;
    if(page_number < 0)
        page_number = page;
    if(page_number > page)
        page_number = 0;

    iptv_channel_list();
}

编辑历史:[此帖最近一次被 allinhands 编辑过(编辑时间:2004-12-13 17:00:10)]


缺缺

职务:管理员
等级:8
金币:41.0
发贴:9620
#22004/12/13 17:04:18
为什么会刷新?没有看到任何相关代码



不是高手

职务:普通成员
等级:3
金币:5.0
发贴:1352
#32004/12/14 10:30:17
代码不全



kismet

职务:普通成员
等级:1
金币:0.0
发贴:15
#42004/12/20 11:41:28
不好意思,我理解错了,现在好了,谢谢!