Cutting 3 characters from a string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am wanting take the first three characters from an input text box. Can
anyone tell me if JavaScript has a function to do this?

Thank you for your assistance

Also I am great difficulty in trying to figure the code to test if an input
text box is empty.
Again if someone has something they could share I would be grateful

Gem_man
 
See http://www.w3schools.com/js/default.asp

--




| Hi
|
| I am wanting take the first three characters from an input text box. Can
| anyone tell me if JavaScript has a function to do this?
|
| Thank you for your assistance
|
| Also I am great difficulty in trying to figure the code to test if an input
| text box is empty.
| Again if someone has something they could share I would be grateful
|
| Gem_man
 
In particular
http://www.w3schools.com/jsref/jsref_substr.asp
What you need is stringObject.substr(start,length)Or to be specific
stringObject.substr(0,3)Stefan B Rusynko wrote:> See
http://www.w3schools.com/js/default.asp> > --> >
_____________________________________________> SBR @ ENJOY (-:
[ Microsoft MVP - FrontPage ]> "Warning - Using the F1 Key will not break
anything!" (-;> To find the best Newsgroup for FrontPage support see:>
http://www.net-sites.com/sitebuilder/newsgroups.asp>
_____________________________________________> > > "Gem_man"
>> Hi>> >> I am
wanting take the first three characters from an input text box.>> Can anyone
tell me if JavaScript has a function to do this?>> >> Thank you for your
assistance>> >> Also I am great difficulty in trying to figure the code to
test if>> an input text box is empty.>> Again if someone has something they
could share I would be grateful>> >> Gem_man-- Cheers,Trevor L.Website:
http://tandcl.homemail.com.au
 
Back
Top