JavaScript: A BackSlash as part of the string
- by Abs
Hello all,
I have a JavaScript variable that I echo out using PHP which is shown like this in the page source:
var db_1 = 'C:\this\path';
When I set the value of a text field with that variable like so:
$('#myinput').val(db_1);
The slashes have disappeared and only the other characters are left!
Why is this and how can I put the slashes back in??
Thanks all