您的位置:首页 > Web前端 > CSS

this.Page.ClientScript.RegisterStartupScript导致页面停顿,样式中的背景图片显示不全

2014-05-20 15:59 531 查看
之前错误的写法是:this.Page.ClientScript.RegisterStartupScript(this.GetType(), "ss", "alert('请根据提示进行操作'); location.href= '" + A1.HRef + "';", true);

修改后的:this.Page.ClientScript.RegisterStartupScript(this.GetType(), "ss", " document.body.onload=sload;function sload(){ location.href= '" + A1.HRef + "';}", true);

在项目中加“ document.body.onload=sload;”这句,让加载完成后调用此方法!

完美解决
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐