首页 > Web开发 > 详细

ASP的页面调用alert 或者msgbox

时间:2014-08-18 12:59:42      阅读:401      评论:0      收藏:0      [点我收藏+]

alert 是javascript的
msgbox 是vbscript的

1、一般的使用方法

alert:

<%   if true then %>
<script language=JavaScript>alert("弹出警告框");</script>
<% end if %>

msgbox:

<script languange="vbscript">
if true then 
   msgbox "safdsaf"
end if 
</script>

2、执行msgbox 和alert之前,asp是会运行完所有的代码,并且将msgbox /alert 的代码数据发送到浏览器才开始执行msgbox/ alert。

alert默认不会刷新页面,如果需要刷新页面:


response.write"<SCRIPT language=JavaScript>alert(‘您已经成功提交了答案‘);"
response.write"window.location.reload()</SCRIPT>"

ASP的页面调用alert 或者msgbox,布布扣,bubuko.com

ASP的页面调用alert 或者msgbox

原文:http://www.cnblogs.com/myhaiou2008/p/3919230.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!