Get lenght of content within HTML

D

davidjdoherty

Hi, I'm receiving input from my user that is HTML. I would like to find
the length of the data within the string, discounting the presentation
logic.

What I mean is that if the user types "<B>Hello</B>", I would like to
find out the length is 5 (the length of 'hello').

Anyone have any ideas of how to this?

Cheers,
David
 
I

IchBin

Hi, I'm receiving input from my user that is HTML. I would like to find
the length of the data within the string, discounting the presentation
logic.

What I mean is that if the user types "<B>Hello</B>", I would like to
find out the length is 5 (the length of 'hello').

Anyone have any ideas of how to this?

Cheers,
David
This is Java group not Javascript. Two different animals. That said look
at http://javascript.about.com/od/reference/g/slength.htm

Better yet a Javascript tutorial.
http://javascript.about.com/od/reference/a/js101.htm
http://www.w3schools.com/js/default.asp
http://www.pageresource.com/jscript/index4.htm

or just google for them
--


Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top