请问为什么会有两个提示

zhangjing711 2009-12-23 05:38:33
<tr><td height="38" colspan="2" bordercolor="#FFFFFF"><div align="center">
<input name="Submit" type="submit" class="STYLE 7" value="提交" onClick="window.open('gain.asp')">  
<input name="reset" type="reset" class="STYLE 7" value="重填" onClick="window.open('gainnew.asp')">
</div></td></tr>
</table>
</form></div>
</body>
</html>



gain.asp程序如下

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn1.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<%
ID=Request("text1")
mingcheng=Request("text2")
xinghao=Request("text3")
zhizaoshang=Request("text4")
chandi=Request("text5")
jiage=Request("text6")
Set rs=server.CreateObject("ADODB.recordset")
sql="update chanpin3 set 产品名称='"&mingcheng&"',产品类型='"&xinghao&"',产品制造商='"&zhizaoshang&"',产地='"&chandi&"',产品价格='"&jiage&"' where 产品编号='"&ID&"'"
rs.Open sql,conn,1,2
%>
<script language="vbscript">
alert("该产品信息修改成功!")
window.location.href="delete1.asp"
</script>
</body>
</html>
点提交后,会有两个"该产品信息修改成功!",而且还有两个delete1.asp页面!
...全文
87 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
nyeah 2009-12-23
  • 打赏
  • 举报
回复
<input name="Submit" type="submit"
改成
<input name="Submit" type="button"
hookee 2009-12-23
  • 打赏
  • 举报
回复
Submit按钮 触发一次递交,然后又打开gain.asp, 如果form的action也是gain.asp的话就会执行2次了。

4,008

社区成员

发帖
与我相关
我的任务
社区描述
它是一种微软环境下的轻量级的解释型语言,它使用COM组件、WMI、WSH、ADSI访问系统中的元素,对系统进行管理。
社区管理员
  • vbScript社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧