问题描述
protectedvoidbtnRemark_Click(objectsender,EventArgse){stringstrResponse;strResponse="";strResponse+="<scriptlanguage='javascript'type='text/javascript'>";strResponse+="alert('感谢你发表评论!')";strResponse+="</script>";this.Response.Write(strResponse);//加入下面这个页面跳转后ALERT窗口就不出来了!stringredirect="";redirect+="Article_Content.aspx?id="+ArticleID;Response.Redirect(redirect);}请问如何实现又跳转又让ALERT窗口出现?谢谢!
解决方案
解决方案二:
protectedvoidbtnRemark_Click(objectsender,EventArgse){stringstrResponse;strResponse="";strResponse+="<scriptlanguage='javascript'type='text/javascript'>";strResponse+="alert('感谢你发表评论!')";strResponse+="window.location.href='Article_Content.aspx?id="+ArticleID+"'";strResponse+="</script>";this.Response.Write(strResponse);}
解决方案三:
楼上好像不行啊....
时间: 2024-10-06 11:58:27