首页 新闻 赞助 找找看

ScriptManager.RegisterStartupScript(Page, Type, string,string,bool)无法换行

0
悬赏园豆:10 [已解决问题] 解决于 2014-04-27 09:24

ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Alert","alert(\"第一行\r\n第二行\")",true);会报脚本错误

ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Alert","alert(\"第一行第二行\")",true);这样就正常.

各位大神们帮忙看看这是为什么呢?

爱走神的猪的主页 爱走神的猪 | 初学一级 | 园豆:193
提问于:2014-03-19 17:20
< >
分享
最佳答案
0

ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Alert","alert('\\n第一行\\n第二行')",true);

收获园豆:10
Yu | 专家六级 |园豆:12980 | 2014-03-20 08:47
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册