I have a problem with the string symbol error, I want replace this symbol , but it doesn't work. My sample code javascript like below the coding:
I am doing below this testing, cannot alert the message
var file_name = "C:fakepathclaim 20210121 1754.sql"; var bbb = file_name.replace("C:fakepath", "123"); alert(bbb);
Backslash begins escape sequences, you need to double them to make them literal.
var file_name = "C:\fakepath\claim 20210121 1754.sql"; var bbb = file_name.replace("C:\fakepath", "123"); alert(bbb);
1.4m articles
1.4m replys
5 comments
57.0k users