浏览器使用jquery在refreshTable上挂起

时间:2013-07-07 23:20:24

标签: jquery

我正在使用jquery使我的表在3秒后自动刷新并且它工作得很好但是过了一段时间浏览器挂起并且不知道为什么 index.html页面

 <html>

<head> <!-- For ease i'm just using a JQuery version hosted by JQuery-
you can download any version and link to it locally --> 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
      refreshTable();
    });

    function refreshTable(){
        $('#data_table').load('get.php');
        setInterval(refreshTable, 3000);
    } 
</script> 
</head> 
<body>
<div id="data_table"> </div> 
</body>

和get.php文件

<TABLE bgcolor="#FFFFFF" border=1 bordercolorlight="#C0C0C0" bordercolordark="#808080">
    <thead>
        <tr>
            <th>FX Pair</th>
            <th>Signal</th>
            <?php if($show=="1" ){ ?>
            <th>Stop Loss</th>
            <th>Take Profit</th>
            <?php } ?>
        </tr>
    </thead>
    <tbody>
        <?php while($data=m ysql_fetch_array($sel)){ ?>
        <TR valign=top>
            <TD width=114>
                <div align=center>
                    <font class="ws18"><?php echo $data['fixed'];?></font>
                </div>
                </div>
            </TD>
            <TD width=114>
                <div align=center>
                    <?php $up=$ data[ 'variable']; if($up=="up" ){ ?>
                    <img src="green.png" width="16px" height="16px">
                    <?php }elseif($up=="down" ){ ?>
                    <img src="red.png" width="16px" height="16px">
                    <?php }elseif($up=="none" ){ ?>
                    <img src="none.jpeg" width="16px" height="16px">
                    <?php } ?>
                </div>
                </div>
            </TD>
            <?php if($show=='1' ){ ?>
            <td width=114>
                <center>
                    <?php echo $data[ 'stop_loss']; ?>
                </center>
            </td>
            <td width=114>
                <center>
                    <?php echo $data[ 'take_profit']; ?>
                </center>
            </td>
            <?php } ?>
        </TR>
        <?php } ?>
</TABLE>

任何想法?

0 个答案:

没有答案