
使用方法
html
<p class="text">我是测试文字,测试高亮功能</p>
<p class="text">我是测试文字,测试高亮功能,点击按钮测试吧</p>
<p class="text">我是测试文字,测试高亮功能</p>
<p class="text">我是测试文字,测试高亮功能,点击按钮测试吧</p>
<p class="text">我是测试文字,测试高亮功能</p>
<p class="text">我是测试文字,测试高亮功能,点击按钮测试吧</p>
js
$(".one").click(function() {
var otext = $("input").val();
$('.text').GL({
ocolor: 'red',//设置关键词高亮颜色
oshuru: otext//设置要显示的关键词
});
})