当前位置: 首页 > 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://wiki.neutronadmin.com/news/111952/

相关文章:

  • 中式建筑网站没网站域名可以做备案吗
  • 手机网站建设万网wordpress实现微信支付
  • 宁波建设业协会网站品牌注册号
  • 建设网站的机构wordpress首页视频
  • 推广网站注册赚佣金百度翻译api wordpress
  • 在墙外的优质网站重庆能创科技有限公司
  • 做衣服 网站wordpress 摘要不显示
  • 学做衣服网站知乎网站网页设计屏幕尺寸
  • php音乐网站设计高大上强企业网站
  • 安徽网站建设网络公司网页设计代码大全图片
  • 网站备案背景布wordpress 正在发送请求
  • 网站域名查询ip杭州网络公司建网站
  • 网站建设分为几个时期设计类招聘网站
  • 贵阳有哪些可以制作网站的公司东莞网站建设推广
  • 提供秦皇岛网站建设价格商业设计师是做什么的
  • 网站空间免费试用网站设计合同范本
  • 电子商务平台经营者有哪些义务郑州外语网站建站优化
  • 农产品电子商务网站建设现状建设公司网站步骤
  • 网站建设查看框架的源代码公司品牌营销策划
  • dedecms小说网站模板番禺网站公司
  • 网站部分乱码wordpress获取文章图片
  • 自己制作的网站如何发布如何免费制作一个自己的网站
  • 麻涌镇仿做网站瑞安网站建设优化
  • 网站开发公司 深圳深圳宝安区邮编
  • 建设网站毕业设计开题报告做it的兼职网站
  • 网站新开怎么做营销胶州市城乡建设局网站截图
  • 网页设计师常用网站建站公司做的网站侵权了
  • 新建的网站只能用临时域名打开网站开发案例图片
  • 深圳营销型企业网站建设银行的投诉网站
  • 哪一个军事网站做的比较好建筑装饰设计资质