why does the trim doesn't really trim? trim not working in my case
I think trim() doesn't store the 'trimed' value.
I apply trim to the result before the user submit their string and it
work, it display properly by skipping the extra space. But I retrieve the
trimed value back, it give me the original of users' input, it doesn't
skip space.
so before i retrieve the user input from the input field, i added trim()
input = $("<input type='text'").val(txt);
input.trim()
it doesn't work?!
No comments:
Post a Comment