Hi!
Sorry for my bad english!
How to delete some text with javascript?
Example:
I have this in textarea: [LINK=http://www.someurl.com]Link - click[/LINK].
I want that the text between "[LINK=" and "[/LINK]" deletes
(output will be "[LINK=[/LINK]").
How to do that?
ivan3510
8
Junior Poster
Recommended Answers
Jump to PostYou would have to use the replace string.
var myString = "this is a string\n that needs \n\n to be on a newline"; var myString2 = myString.replace(/\n/g, "<br>"); document.write (myString2);
Jump to PostOk my bad on the post, i wasnt writing to you. Anyways, you have to use the substring method. Sorry for the above post.
All 8 Replies
fobos
19
Posting Whiz in Training
fobos
19
Posting Whiz in Training
Taywin
312
Posting Virtuoso
ivan3510
8
Junior Poster
Taywin
312
Posting Virtuoso
ivan3510
8
Junior Poster
Taywin
312
Posting Virtuoso
ivan3510
8
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.