if $(this).val() have backslash remove backslash in it by jQuery. How is it?
1111\/11\/11
-> 1111/11/11
$(this).val().replace(/\\/g, '');
You have to use two backslashes to get the \ character. A single backslash is used for control characters such as \r \n etc. Using the double backslash escapes this and gives you what you want.
var str = $(this).val().replace('/','');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With