日期:2014-05-17  浏览次数:20979 次

我的程序老是提交两次,重复写入了两次!请高手检查下我程序
表单页面
<%          
    Response.Buffer       =       True          
    Response.ExpiresAbsolute       =       Now()       -       1          
    Response.Expires       =       0          
    Response.CacheControl       =       "no-cache "          
    %>
<!--#include   file= "dbconnect/conn_inc.asp "   -->
<!--#include   file= "inc/CheckClass.inc.asp "   -->
<META   http-equiv=Content-Type   content= "text/html;   charset=big5 ">
<%
s_id=RtnReplaceInt(request( "id "),0)
mUserUID=session( "userid ")
if   Session( "UserName ")= " "   or   session( "usernum ")= " "   or   session( "userid ")= " "   or   session( "userpwd ")= " "   then  
response.write   " <script   LANGUAGE= 'javascript '> alert( '岿\n\n   叫祅嘲 ');window.navigate( 'porshow.asp?id= "&s_id& " '); </Script> "
Response.End  
end   if
%>
<%
dim   rs,sql
set   rs=server.createobject( "adodb.recordset ")
sql= "select   *   from   ShopItemMap   where   ProductNum= ' "&s_id& " ' "
rs.open   sql,ranshop_conn,1,1
mProductNum=rs( "ProductNum ")
mItemName=rs( "ItemName ")
mItemMoney=rs( "ItemMoney ")
rs.Close
set   rs=Nothing
%>


<HTML>
<HEAD>
<TITLE> <%=ItemName%> </TITLE>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=big5 ">
<link   rel= "stylesheet "   href= "/css/style.css "   type= "text/css ">
<script   language=javascript>
<!--


function   saveIt()
{

if   (document.pub_topic.adduser.value== " ")
{  
  alert( '叫块Μ砯笴栏à︹ ');  
document.pub_topic.adduser.focus();
return   false;  
}

if   (document.pub_topic.addcontent.value== " ")
{  
  alert( '叫块祏獺ず甧 ');  
document.pub_topic.addcontent.focus();
return   false;  
}
          document.pub_topic.submit();
}
//-->
</script>
</HEAD>
<BODY   bgColor=#FFFFFF   topMargin=0   leftmargin= "0 ">
    <form   name= "pub_topic "   method= "post "   action= "Giftok.asp "   ID= "pub_topic ">
<table   width= "362 "   border= "0 "   cellspacing= "1 "   cellpadding= "3 "     align=center>

        <tr   bgcolor= "#FF6600 ">  

            <td   height= &