TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
albert albert
NA
524
0
split string
Oct 24 2013 11:16 AM
Hi everybody,
I have this:
[code]
function splitButtonPressed()
{
var inputString = document.getElementById("inputVal").value;
var tokens = inputString.split(" " + "\n");
document.getElementById("output").value = inputString.replace(/\s+/g, ' ', "\n");
document.getElementById("ouput").value = tokens.indexOf(inputString);
}
document.getElementById("outputSubstring").value = inputString.substring(0, 10);
// end function splitButtonPressed
// -->
</script>
[/code]
But now for example I type: 33 88, then output ---> 33 88. But it has to be:
33
88
So the extra space is will be omitted, but it is still one the same row and not under each other How to manage that?
Thank You.
Reply
Answers (
5
)
forget password control in visual studio 2010
External Css