首页 > 代码库 > Jquery替换内容

Jquery替换内容

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="https://raw.githubusercontent.com/huangshiyu13/huangshiyu13.github.com/master/scripts/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
 $(document).ready(function(){
   var el = $(body); 
     el.html(el.html().replace("喵喵喵", 可爱的点点));
 });

$(function(){ 
setInterval(function(){
  var el = $(body); 
    el.html(el.html().replace("喵喵喵", 可爱的点点));
},1000); 
}); 

</script>
</head>

<body>
喵喵喵
</body>

</html> 

 

Jquery替换内容