百度【高亮截取显示】几行代码就搞定

1.需求描述:

根据根据关键字高亮显示数据,并且显示高亮位置部分文字

2.效果展示

2.1初始化效果


2.2输入关键字


3.源代码奉上


"en">


    "UTF-8">
    "viewport" content="width=device-width, initial-scale=1.0">
    "X-UA-Compatible" content="ie=edge">
    Document
    
    



    type="text" id="text" placeholder="请输入关键字" />
    type="button" id="button" value="确定" />
    
"content" class="content">
复制代码


转载于:https://juejin.im/post/5d0a1af4f265da1bd3055dfb

你可能感兴趣的:(百度【高亮截取显示】几行代码就搞定)