JavaScript转义符

 

        var path = 'C:\Windows\System32\drivers';
        alert(path);

输出:C:WindowsSystem32drivers

        var path = 'C:\\Windows\\System32\\drivers';
        alert(path);

输出:C:\Windows\System32\drivers

常见转义符:\t , \n , \' , \\

posted @ 2017-06-14 10:56  雷鸣之秋  阅读(215)  评论(0编辑  收藏  举报