12月29

response.write alert页面错位

| |
11:58 奇趣网络信息  From: 本站原创
response.write alert页面错位,页面弹出窗口,确定后返回原页面,页面错位的问题,怎么解决呢!

1. ASP response.write alert页面错位 如果你的代码是写在页面的顶部,那么把他放到页面body内部开始位置,ASP中解决问题
实例代码:(一个顶部的层提示,5秒后关闭提示的效果)

<%
dim cityid
cityid=trim(request.QueryString("cityid"))
if len(cityid)=0 then
cityid=321
'Response.Write("<script>alert('无传入参数,系统将为您转到上海租车服务页面!');</script>")
%>
<DIV id="youqingtixing" style="width:950PX; margin:0 auto; margin-bottom:5px; background-color:#fff;  color:#FF9900; font-size:14px; font-weight:bold; text-indent:50px;"><img src="zuche_images/gantanhao.gif" alt="友情提醒!"  style="vertical-align:middle;" />&nbsp;&nbsp;您选择城市不存在或不可用,系统将为您转到 " 上海 "的页面!</DIV>
<SCRIPT LANGUAGE="JavaScript">
<!--
//10秒自动关闭
setTimeout("closeAd()",5000);
function closeAd()
{
document.getElementById("youqingtixing").style.display="none";
}
//-->
</SCRIPT>
<%end if%>


2. ASP.NET response.write alert页面错位

Page.ClientScript.RegisterClientScriptBlock(typeof(string),   "clientScript",  
"<script>window.parent.returnValue='"   +   FromDateChooser.DateValue   +
  "';window.parent.close();</script>");  

最后编辑: tommyhu 编辑于2009/12/29 12:20
阅读(5446) | 评论(1) | 引用(0)
tommyhuc.cn网友
2009/12/29 19:46
顶一下。兄弟最近很勤奋啊!
tommyhu 回复于 2009/12/30 08:04
瞎整
分页: 1/1 第一页 1 最后页
在此留下酱油瓶-:)
表情
emotemotemotemotemotemotemotemotemotemotemotemotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我

您的大名(例如:小明) : 

密码(可不填) :  游客无需密码

网址 (可不填) : 

电邮 (可不填) :  [注册]