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