首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

alert的一个小疑点

2012-01-23 
alert的一个小问题stringstrtemp保存位置: +Request.PhysicalApplicationPath+Test Page.RegisterSt

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

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

[解决办法]
被js理解成转移字符了

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

热点排行