首页 > 开发 > AJAX > 正文

ajax弹出alert()的问题?

2024-09-01 08:15:05
字体:
来源:转载
供稿:网友

string js = " < script language='javascript'> alert('编辑成功!'); < /script> " ;

ScriptManager.RegisterClientScriptBlock(this, this.GetType(), " msg" , js, false);

出现如下错误提示,是什么原因?

Sys.WebForms.PageRequestManagerParserErrorException:The message received from the server
count not be parsed.Common causes for this error are when the response is modified by calls to response.Write(),response filters,HttpModules,or server trace is enabled.
Details:Error parsing near'uage'; " javascript" } |

答:

1.因为ajax已经封装了js,所以有些是不可用的

2.ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), " click" , " alert('修改成功!')" , true);

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表