为了账号安全,请及时绑定邮箱和手机立即绑定

input iqidin mazmun tepix

标签:
Html5

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<title></title>

<link rel="stylesheet" href="">

<style type="text/css" media="screen">

span{

background: red;

}

</style>

</head>

<body>

<input type="text" id="input">

<button id="btn">搜索</button>

<hr>

<p id="content">

You should probably watch at 1.5x and skip parts you are familiar with. I go through pretty ploddingly with only a couple edits at the beginning. The rest is stream of consciousness. Here is the code 

</p>

</body>

</html>

<script type="text/javascript">

var btn=document.getElementById('btn');

var content=document.getElementById('content');


btn.=function(){

var input=document.getElementById('input');

var val=input.value;

if(input.value<=0){

return;

}

//Awal html ning Text Kimmit Ni elwal Dim 

var text=content.innerText;

//Html Ning Html Mazmun Ni Kuruk Diwattim

content.innerHTML='';

//Html Ning Mazmu Niga =  Elwal Gan Text Kimmat Ni , span Bar Kimmat Ka Almax Turwattim 

content.innerHTML=text.replace(val,"<span class='key'>"+val+"</span>")

}

</script>


点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
Web前端工程师
手记
粉丝
37
获赞与收藏
165

关注作者,订阅最新文章

阅读免费教程

  • 推荐
  • 1
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消