Laravel:刷新div

时间:2017-03-16 13:24:49

标签: javascript php jquery html laravel

第一个Laravel项目。如何刷新页面上的div,幻灯片放映在哪里? 我试过了,但没有工作:

var auto_refresh = setInterval(function () {
    $('.View').fadeOut('medium', function() {
        $(this).load('/echo/json/', function() {
            $(this).fadeIn('slow');
        });
    });
}, 2000);

div,我想要刷新的内容:

<div class="left">
    <table border=1>
    <tr>
        <th>Barcode</th>
        <th>Name</th>
        <th>Count</th>
        <th>Netto price</th>
        <th>Brutto Price</th>
        <th>Summary</th>
    </tr>
@foreach ($summary as $summary)
<tr>
<td>{{ $summary->barcode }}</td>
<td>{{ $summary->name }}</td>
<td>{{ $summary->count }}</td>
<td>{{ $summary->nprice }}</td>
<td>{{ $summary->price }}</td>
<td>{{ $summary->summ }}</td>
</tr>
@endforeach
<tr><td colspan=5>Summary:</td>
<?php $help = DB::select('select * from helper');
echo '<td>' . $help[0]->summ . '</td>';
?>
</tr>
</table>
</div>

0 个答案:

没有答案