當 F 列顯示 F 的值時,我無法突出顯示一行。我知道我可以通過 CSS/JS 完成此操作,但一直遇到磚墻。我對編碼很陌生,如果可能的話希望得到一些幫助。
目標:當 F 列顯示 F 值時,需要將整行突出顯示為黃色。
先感謝您!!!
<div class='row'>
<div class='col-lg-12 col-sm-12'>
<div class='panel panel-primary'>
<div class='panel-heading'>
<h3 class='panel-title'><i class='fa fa-bar-chart-o'></i>Priority Lots</h3>
</div>
<table class='table'>
<thead>
<tr>
<th>LOT</th>
<th>LPT</th>
<th>OPN</th>
<th>DEVICE</th>
<th>QTY</th>
<th>DTTM</th>
<th>I</th>
<th>H</th>
<th>F</th>
<th>P</th>
<th>S</th>
<th>LOCATION</th>
<th>STATUS</th>
<th>EQUIP</th>
</tr>
</thead>
</div>";
$sqlstr="select l.lot, l.lpt, lc.opn, ls.device, l.cur_qty as qty,
round((sysdate - l.last_act_dttm)*24,1) as dttm,
l.isc as i, l.hold as h, l.ftr_hold as f, ls.priority as p,
ls.swr as s, ls.lot_code3 as location,
decode (lc.lot_status,'P',' Processing ') as status, lc.equip
from lot l, lot_str ls, lot_cur_opn lc, lpt_grp_lpt_lst lg
where l.facility = 'DP1DM5' and lc.facility = l.facility
and ls.facility = l.facility and lg.lpt_grp_facility = 'DP1DM5'
and l.lot = ls.lot and l.lot = lc.lot
and ls.latest = 'Y' and ls.priority != 'N'
and ls.priority IN ('0','1','2','3')
and l.lpt < 'TRM' and ls.latest = 'Y' and l.lpt = lg.lpt
and lg.lpt_grp_type = 'G' and lg.lpt_grp = '3005'
order by p, lpt
";
$sth = $dbh->prepare($sqlstr);
$sth->execute();
$sth->bind_columns(undef, \$LOT, \$LPT, \$OPN, \$DEVICE, \$QTY, \$DTTM, \$I, \$H, \$F, \$P, \$S, \$LOCATION, \$STATUS, \$EQUIP);
while($sth->fetch()) {
print "
<tbody>
<tr class='row100 body'>
<td class='cell100 column4'>$LOT</td>
<td class='cell100 column4'>$LPT</td>
<td class='cell100 column4'>$OPN</td>
<td class='cell100 column4'>$DEVICE</td>
<td class='cell100 column4'>$QTY</td>
<td class='cell100 column4'>$DTTM</td>
<td class='cell100 column4'>$I</td>
<td class='cell100 column4'>$H</td>
<td class='cell100 column4'>$F</td>
<td class='cell100 column4'>$P</td>
<td class='cell100 column4'>$S</td>
<td class='cell100 column4'>$LOCATION</td>
<td class='cell100 column4'>$STATUS</td>
<td class='cell100 column4'>$EQUIP</td>
</tr>";
}
print "</tbody>
</table>
</div>
<BR>
<BR>
</div>
這是 F 列的螢屏截圖:

uj5u.com熱心網友回復:
在創建簡單的存根 HTML 頁面時,這可以以黃色或不突出顯示該行。
my ($LOT, $LPT, $OPN, $DEVICE, $QTY, $DTTM, $I, $H, $F, $P, $S, $LOCATION, $STATUS, $EQUIP) = ('LOT', 'LPT', 'OPN', 'DEVICE', 'QTY', 'DTTM', 'I', 'H', 'F', 'P', 'S', 'LOCATION', 'STATUS', 'EQUIP');
print "<html><body><table>\n";
# while($sth->fetch()) {
my $highlight = $F eq 'F' ? ' BGCOLOR="#FFFF00"' : '';
print "
<tbody>
<tr$highlight class='row100 body'>
<td class='cell100 column4'>$LOT</td>
<td class='cell100 column4'>$LPT</td>
<td class='cell100 column4'>$OPN</td>
<td class='cell100 column4'>$DEVICE</td>
<td class='cell100 column4'>$QTY</td>
<td class='cell100 column4'>$DTTM</td>
<td class='cell100 column4'>$I</td>
<td class='cell100 column4'>$H</td>
<td class='cell100 column4'>$F</td>
<td class='cell100 column4'>$P</td>
<td class='cell100 column4'>$S</td>
<td class='cell100 column4'>$LOCATION</td>
<td class='cell100 column4'>$STATUS</td>
<td class='cell100 column4'>$EQUIP</td>
</tr>";
}
print "</tbody></table>\n";
#
print "</body></html>\n";
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/466455.html
