Created
July 22, 2013 05:09
-
-
Save WenLiangTseng/6051406 to your computer and use it in GitHub Desktop.
取代所有字串
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//text版 | |
$('#test').each(function(){ | |
var $this = $(this); | |
var t = $this.text(); | |
$this.html(t.replace('<','<').replace('>', '>')); | |
}); | |
//HTML版 | |
$('#test').each(function(){ | |
var $this = $(this); | |
var t = $this.html(); | |
$this.html(t.replace('<','<').replace('>', '>')); | |
}); | |
//實際 | |
<script type="text/javascript"> | |
jQuery('document').ready(function($) { | |
$("p.ngg-img-title").each(function() { | |
var ieg_ngg_title = $(this).text(); | |
ieg_ngg_title = ieg_ngg_title.replace('<','<').replace('>', '>'); | |
$(this).html(ieg_ngg_title); | |
}); | |
}); | |
</script> | |
<script type="text/javascript"> | |
jQuery('document').ready(function($) { | |
$("p.ngg-img-title").each(function() { | |
var textTobeReplace = $(this).text(); | |
textTobeReplace = textTobeReplace.replace('<','<').replace('>', '>'); | |
$(this).html(textTobeReplace); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment