Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次の文字列を次の文字列から変換するにはどうすればよいですか
var x = "F:\RSSIMS\database\"
に:
var x = "F:\\RRSIMS\\database\\"
ご助力いただきありがとうございます。
var x = "F:\RSSIMS\database\"はすでに無効です。バックスラッシュをエスケープする必要があります。
var x = "F:\\RSSIMS\\database\\";//stores the string `F:\RSSIMS\database\` in x.
今すぐ二重スラッシュが必要な場合は、以下を実行して、すべての単一スラッシュを二重スラッシュに置き換えます。
x = x.replace(/\\/g,"\\\\");