帮忙修改一小条ASP源代码,是Response.Write的。

来源:百度知道 编辑:UC知道 时间:2024/06/27 04:14:23
【原代码是】
emailwindowvar=window.open('','emailwindow','left=50,top=300,toolbar=no,scrollbars=no,resizable=0,menubar=no,width=152,height=153');
emailwindowvar.location.href="asp/msg_page.asp?info=您好!小鱼发现您有<b><%=cstr(rs.recordcount)%></b>封新邮件,请尽快查收哟!&title=新邮件";
【要求新代码是:将下面代码替换旧代码中的弹出窗口】
<script language=JavaScript>var oPopup = window.createPopup(); var popTop=50; function popmsg(msgstr){ var winstr="<table width=\"241\" height=\"180\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"; winstr+="<tr><td align=\"center\"><table width=\"90%\" height=\"180\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"; winstr+="<tr><td align=\"center\">&l

这么多字符直接用判断吧
<%if 有短消息 then call showopenwindow()%>

<%sub showopenwindow()%>
<script language=JavaScript>var oPopup = window.createPopup(); var popTop=50; function popmsg(msgstr){ var winstr="<table width=\"241\" height=\"180\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"; winstr+="<tr><td align=\"center\"><table width=\"90%\" height=\"180\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"; winstr+="<tr><td align=\"center\"><table width=\"90%\" height=\"180\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"; winstr+="<tr><td valign=\"top\