Remove a word from a string
i want to remove a particular #keyword from a string. i dont know its position or anything. can i use javascript to do it?
var str = "particular #keyword";
str.replace("keyword", "new");
alert(str); //-> "particular #new"
yes, you can, using .replace() method
精彩评论