Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-21-2012, 06:10 PM   PM User | #1
anandselvaraj
New Coder

 
Join Date: Dec 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
anandselvaraj is an unknown quantity at this point
Replace the string using regular expression

Hi Guys....


I have a word like this

web developer, php is serverside.

have to change
php is good server.



please help me in javascript ...............
anandselvaraj is offline   Reply With Quote
Old 02-22-2012, 03:02 PM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,335
Thanks: 13
Thanked 207 Times in 207 Posts
DanInMa is on a distinguished road
Quote:
Originally Posted by anandselvaraj View Post
Hi Guys....


I have a word like this

web developer, php is serverside.

have to change
php is good server.



please help me in javascript ...............
Code:
<script type="text/javascript">

function phpsigood(txt_str){
var bb = txt_str.split(" ")
var cc = "is good server."
alert(bb[1]+cc)
}

window.onload = phpisgood("web developer, php is serverside.")
</script>
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Reply

Bookmarks

Tags
javascript, regular expression

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:06 PM.


Advertisement
Log in to turn off these ads.