您的位置:首页 > 其它

smarty之section用法 隔行换色,鼠标over高亮

2012-11-22 10:21 267 查看
<table border="0" width="100%" align="center" class="table_common" cellpadding="0" cellspacing="0">
<tr class="tr_common_title">
<th>ID</th><th>Remark</th><th>申核人</th><th>时间</th>
</tr>
{{section name="val" loop="$auditInfo"}}
<tr class="{{if $smarty.section.val.index % 2 >0}}tr_common_row_odd{{else}}tr_common_row_even{{/if}}" onmouseover="this.className='tr_common_row_hover';" onmouseout="this.className='{{if $smarty.section.val.index % 2 >0}}tr_common_row_odd{{else}}tr_common_row_even{{/if}}';">
<td>{{$smarty.section.val.index}}{{$auditInfo[val].audit_id}}</td><td>{{$auditInfo[val].idc_remark}}</td><td>{{$auditInfo[val].user_name}}</td><td>{{$auditInfo[val].create_time|date_format:"%Y-%m-%d"}}</td>
</tr>
{{sectionelse}}
<tr class="tr_common_row">
<td colspan="4">{{lang t='ui_c_nodata'}}</td>
</tr>
{{/section}}
</table>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: