bvdman89
09-04-2008, 10:55 PM
I have a variable:
words[1] = "hello sam"
Is there a way to make it respect html formatting such as..
words[1] = "<b>hello</b><br><i>sam</i>"
yeal352
09-05-2008, 06:27 AM
I have a variable:
words[1] = "hello sam"
Is there a way to make it respect html formatting such as..
words[1] = "<b>hello</b><br><i>sam</i>"
like this :
words[1].split(' ');
you can use "split" to split the string to an array,then ,you know
rhinodog8
09-05-2008, 07:57 AM
you could use document.write="<b>hello</b><br><i>sam</i>"
and put that into a function.
bvdman89
09-05-2008, 05:48 PM
Thank you for the replies.
I'm very new to javascript. Can you describe "split" more.
And for document.write, where would I place this?
yeal352
09-08-2008, 01:59 AM
split is a function of "String" you can split a string with the function ...
detail usage you may find in google...so does "document write"