码迷,mamicode.com
首页 > Web开发 > 详细

ASP MVC 后台控制器弹出框提示

时间:2015-05-18 23:14:15      阅读:657      评论:0      收藏:0      [点我收藏+]

标签:mvc   asp   javascript   后台提示框   


提示框点击确定后页面变成空白页面

<span style="font-size:14px;">return Content("<script>alert('请先登录');</script>");</span>


提示框点击确定后页面变成你想要的页面(如实原页面怎会刷新一下)

<span style="font-size:14px;">return Content("<script>alert('请先登录');window.location.href='../home/index';</script>");</span>

接下来才是我所要讲的重点:提示框点击确定后页面返回原页面(不刷新,还保留页面用户输入的数据)

<span style="font-size:14px;">return Content("<script>alert('请先登录');<span style="color: rgb(51, 51, 51); font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 24px; background-color: rgb(245, 245, 245);">history.go(-1);</span></script>");</span>

其实它的实质为后退一步历史记录。

ASP MVC 后台控制器弹出框提示

标签:mvc   asp   javascript   后台提示框   

原文地址:http://blog.csdn.net/agonie201218/article/details/45825171

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!