I am struggling to remove white spaces, any body help me
var dt1="11 : 30 : am";
I want the result var dt1="11:30:am";
I am struggling to remove white spaces, any body help me
var dt1="11 : 30 : am";
I want the result var dt1="11:30:am";
Don't you ask this question every day?
I can find it in 10 seconds with Google, it doesn't need a discussion!
Before i asked php code, but know asked in javascript.
sorry, i wont ask small questions.. here after
Regards,
Ramu M
I can find it in 10 seconds with Google, it doesn't need a discussion!
I think I beat your time. Took me 6 seconds.
http://stackoverflow.com/questions/5963182/how-to-remove-spaces-from-a-string-using-javascript
dt1.match(/\S+/g).join('');
_> "11:30:am"
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.