高亮显示关键字
来源:互联网 发布:软件系统开发招标书 编辑:程序博客网 时间:2024/05/21 11:38
<!-- /* Font Definitions */ @font-face{font-family:宋体;panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-alt:SimSun;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:3 135135232 16 0 262145 0;}@font-face{font-family:"/@宋体";panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal{mso-style-parent:"";margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph;mso-pagination:none;font-size:10.5pt;mso-bidi-font-size:12.0pt;font-family:"Times New Roman";mso-fareast-font-family:宋体;mso-font-kerning:1.0pt;}p.MsoHeader, li.MsoHeader, div.MsoHeader{margin:0cm;margin-bottom:.0001pt;text-align:center;mso-pagination:none;tab-stops:center 207.65pt right 415.3pt;layout-grid-mode:char;border:none;mso-border-bottom-alt:solid windowtext .75pt;padding:0cm;mso-padding-alt:0cm 0cm 1.0pt 0cm;font-size:9.0pt;font-family:"Times New Roman";mso-fareast-font-family:宋体;mso-font-kerning:1.0pt;}p.MsoFooter, li.MsoFooter, div.MsoFooter{margin:0cm;margin-bottom:.0001pt;mso-pagination:none;tab-stops:center 207.65pt right 415.3pt;layout-grid-mode:char;font-size:9.0pt;font-family:"Times New Roman";mso-fareast-font-family:宋体;mso-font-kerning:1.0pt;} /* Page Definitions */ @page{mso-page-border-surround-header:no;mso-page-border-surround-footer:no;}@page Section1{size:595.3pt 841.9pt;margin:72.0pt 90.0pt 72.0pt 90.0pt;mso-header-margin:42.55pt;mso-footer-margin:49.6pt;mso-paper-source:0;layout-grid:15.6pt;}div.Section1{page:Section1;}-->
高亮显示关键字
效果:
到
实现方法及步骤:点击搜索按钮,跳转到serch.php 并查处含有关键字的商品
代码:
$query = mysql_query($sql);
$num2=mysql_num_rows($query);
while($rs=mysql_fetch_array($query)){
$sort2[]=array(
'id' => $rs['id'],
//'product_name'=> $rs['product_name'],
'product_name'=>preg_replace("/($keyword)/i","<fontcolor=red><b>//1</b></font>",$rs[product_name]),
'product_hao' => $rs['product_hao'],
'picture' => $rs['picture'],
'product_xin' => $rs['product_xin']
);
// print_r($sort2);
}
}
$tpl ->assign('pagenav',$pagenav);
$tpl ->assign('sort',$sort);
$tpl ->assign('sort2',$sort2);
$tpl->display('search.htm');
?>
- 高亮显示关键字
- 高亮显示关键字
- 高亮显示关键字
- 高亮显示关键字
- 关键字高亮显示
- 关键字高亮显示
- 关键字高亮显示
- 关键字高亮显示
- 关键字高亮显示
- 关键字高亮显示
- 如何高亮显示关键字
- Lucene关键字高亮显示
- js 关键字 高亮 显示
- js高亮显示关键字
- eclipse 关键字高亮显示
- AndroidTextview关键字高亮显示
- 搜索关键字显示高亮
- 与关键字的高亮显示相关
- 心里有座坟,葬着未亡人
- Run-Time Check Failure #2 - Stack around the variable 'var' was corrupted
- 纠结的忧伤 纠结的爱
- 去除字符串首尾空格和特殊字符
- SMARTY映射下拉菜单
- 高亮显示关键字
- 高亮显示关键字
- 关闭页面时的操作
- matlab 画圆
- 简单的页面传值
- 关于CV界的一些 东西 (Computer Vision)
- 调用函数验证密码和确认密码
- 登录时跳转再跳转的道理
- 彼得德鲁克管理理念摘写