12月29
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;" /> 您选择城市不存在或不可用,系统将为您转到 " 上海 "的页面!</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
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;" /> 您选择城市不存在或不可用,系统将为您转到 " 上海 "的页面!</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
tommyhuc.cn网友
2009/12/29 19:46
顶一下。兄弟最近很勤奋啊!
tommyhu 回复于 2009/12/30 08:04
瞎整
分页: 1/1
1
1

曾轶可《还能孩子多久》
苏州工业园区独墅湖基督教堂





