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> 

 

posted @ 2017-05-13 09:24  Shiyu_Huang  阅读(1578)  评论(0编辑  收藏  举报