function showbroker(id)
{
$(".borker").removeClass("hover");
$("#"+id).addClass("hover");
$.ajax({
url:'/bottom/selbrokers',
type:'post',
dataType:'html',
data:{type:id},
success:function(data){
$(".boker_tab").html(data);
添加html()内容
},
error:function(msg){
}
});
}
$(document).ready(function() {
showbroker('all');
});
selbrokers.phtml
php 循环TR
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<?php foreach($this->row as $k => $v):?>
<td>
<img src="../default/images/broker/<?php echo $v['img'] ?>" />
</td>
<?php if( ($k+1)%5 == 0):?>
</tr>
<tr>
<?php endif;?>
<?php endforeach;?>
</tr>
</table>