当前位置: 首页 > news >正文

西安网站制作流程自己做网站如何赚钱

西安网站制作流程,自己做网站如何赚钱,南昌免费网站建站模板,wordpress 做的官网使用jQuery怎么实现一个页面关键字搜索功能发布时间#xff1a;2021-01-04 16:46:38来源#xff1a;亿速云阅读#xff1a;136作者#xff1a;Leah这篇文章给大家介绍使用jQuery怎么实现一个页面关键字搜索功能#xff0c;内容非常详细#xff0c;感兴趣的小伙伴们可以参…使用jQuery怎么实现一个页面关键字搜索功能发布时间2021-01-04 16:46:38来源亿速云阅读136作者Leah这篇文章给大家介绍使用jQuery怎么实现一个页面关键字搜索功能内容非常详细感兴趣的小伙伴们可以参考借鉴希望对大家能有所帮助。具体代码Searchp { border:1px solid black;width:500px;padding:5px;}.highlight { background-color:yellow; }I consider that a mans brain originally is like a little empty attic, and you have to stock it with such furniture as you choose. A fool takes in all the lumber of every sort that he comes across, so that the knowledge which might be useful to him gets crowded out, or at best is jumbled up with a lot of other things, so that he has a difficulty in laying his hands upon it.I consider that a mans brain originally is like a little empty attic, and you have to stock it with such furniture as you choose. A fool takes in all the lumber of every sort that he comes across, so that the knowledge which might be useful to him gets crowded out, or at best is jumbled up with a lot of other things, so that he has a difficulty in laying his hands upon it.I consider that a mans brain originally is like a little empty attic, and you have to stock it with such furniture as you choose. A fool takes in all the lumber of every sort that he comes across, so that the knowledge which might be useful to him gets crowded out, or at best is jumbled up with a lot of other things, so that he has a difficulty in laying his hands upon it.$(document).ready(function (){$(#search).click(highlight);//点击search时执行highlight函数$(#clear).click(clearSelection);//点击clear按钮时执行clearSelection函数function highlight(){clearSelection();//先清空一下上次高亮显示的内容var searchText  $(#text).val();//获取你输入的关键字var regExp  new RegExp(searchText, g);//创建正则表达式g表示全局的如果不用g则查找到第一个就不会继续向下查找了$(p).each(function()//遍历文章{var html  $(this).html();var newHtml  html.replace(regExp, searchText);//将找到的关键字替换加上highlight属性$(this).html(newHtml);//更新文章});}function clearSelection(){$(p).each(function()//遍历{$(this).find(.highlight).each(function()//找到所有highlight属性的元素{$(this).replaceWith($(this).html());//将他们的属性去掉});});}});关于使用jQuery怎么实现一个页面关键字搜索功能就分享到这里了希望以上内容可以对大家有一定的帮助可以学到更多知识。如果觉得文章不错可以把它分享出去让更多的人看到。
http://www.yutouwan.com/news/111952/

相关文章:

  • 定制软件公司医院网站优化策划
  • 做网站安阳中建西部建设北方有限公司网站
  • 网站建设塞西wordpress 前台投稿插件
  • 上海网站建设选缘魁-企查wordpress分类更改
  • php直播网站开发网站开发菜鸟适合用什么软件
  • 品牌网站建设有哪些内容seo技术秋蝉
  • 网站核验单下载wordpress用什么主机好
  • 网站首页建设中页面大连甘井子区教育公共服务平台
  • 青岛做网站皆赴青岛博采深圳自适应网站的公司
  • 新手网站设计定价吉林电商网站建设公司哪家好
  • 如何做正规电影网站湖北省建设部网站
  • 建设通网站怎么查项目经理在建做高端网站建设公司
  • 怎样做自己的 优惠卷网站网站服务器的费用
  • 怎么做装修网站福州网站设计网站系统制作
  • 西安网站制作公司排阜阳哪里做网站的多
  • 怎样在手机做自己的网站wordpress 外链图片
  • vps做自己的网站洛阳做网站哪家便宜
  • php网站后台模板下载不了利用大平台做网站
  • 做暧暧小视频免费网站抖音代运营都做什么
  • 常熟网站建设专业的公司网站的定位分析
  • php网站开发 多少钱外贸软件定制
  • 网站制作和推广lv官网微信网页版下载安装
  • 网站建设维护属于什么专业广告推广是什么
  • 手机网站建设的背景有别墅的件怎么写者
  • 华为电子商务网站建设网站首页html
  • 中学网站建设 课设17网站一起做网店广州国大
  • 兰州优化网站网站建设的认可
  • 做网站图片怎么做wordpress实现301跳转详解
  • 泉州有哪些做网站的平面设计公司广告语
  • 做英文网站怎样网站建设