Code & help 4 PHP, JavaScript, HTML, DHTML, CSS, Flex, Dot Net, SharePoint, C-Sharp, Java, IT Interview Questions, Web Tools
Sunday, June 14, 2009
How to Replace All in Javascript
How to replace all string using javascript replace function... Here is simple example replace all in javascript in replace string method.
CODE:
<Script Language="javascript"> var str = "This is the test string."; var rs = str.replace(/is/g,""); document.write(st); // result "Th the test string." </Script>
0 comments:
Post a Comment