By Using regular expression with javascript replace function we can implement replace all functionality.here is the sample code block for javascript replace all functionlity.
<Script Language="javascript">
var str = "Javascript replace test.";
var rs = str.replace(/is/g,"");
document.write(st);
</Script>
here /is key for case insensitive search and /g recursive search
No comments:
Post a Comment