Thank you for sending me the script.I am a rookie in Javascript but i want to learn.
But a friend of mine told me somthing about regular expessions. Is it possible to write all the code that you gave me in one line with regular expressions?
Thanks
Suppy
ok thanks anyway.
but i have one more question.
how do i use your function?
is it correct this way
var x=trim("some thing"
response.write(x)
on my screen will apear "something" in one word not in two
The function I wrote will trim all leading and trailing white space from a string, but leave anything inside alone. Did you want ALL white space removed, sothewholestringisonebigword?
What I wrote will give you:
var oldstring=' some thing ';
var newstring=trim(oldstring);
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.