日期:2014-05-18  浏览次数:20445 次

alert的一个小问题
string   strtemp   =   "保存位置: "   +   Request.PhysicalApplicationPath   +   "Test ";
Page.RegisterStartupScript( " ",   " <script> alert( ' "   +   strtemp   +   " '); </script> ");

这样提示的路径中没有 "\ ",是什么原因呢?

------解决方案--------------------
被js理解成转移字符了

string strtemp =Request.PhysicalApplicationPath.Replace(@ "\ ",@ "\\ ");