标题:帮我看看添加代码有什么错误?
只看楼主
mojian0820
Rank: 1
等 级:新手上路
帖 子:34
专家分:0
注 册:2005-11-28
 问题点数:0 回复次数:2 
帮我看看添加代码有什么错误?

<!--#include file="conn.asp"-->
<% if request.form("submit")="录入" then
kaohao=request.form("kaohao")
xingming=request.form("xingming")
Politics=request.form("Politics")
math=request.form("math")
language=request.form("language")
Specialized=request.form("Specialized")
fenshu=int(Politics)+int(math)+int(language)+int(Specialized) 
exec="select * from kfcx where kaohao='"&kaohao&"'"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,3
if not rs.eof then
response.write "<script language='javascript'>" & chr(13)
response.write "alert('添加失败已有考生编号');" & Chr(13)
response.write "window.document.location.href='javascript:history.back(-1);';"&Chr(13)
response.write "</script>" & Chr(13)
Response.end
else
rs.addnew
rs("kaohao")=kaohao
rs("xingming")=xingming
rs("fenshu")=fenshu
rs("politics")=politics
rs("math")=math
rs("language")=language
rs("Specialized")=Specialized
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>" & chr(13)
response.write "alert('添加成功');" & Chr(13)
response.write "window.document.location.href='javascript:history.back(-1);';"&Chr(13) '这一行要不要自己决定
response.write "</script>" & Chr(13)
Response.end

%>
<%end if%>
<%end if%>
<%conn.close
set conn=nothing
%>
运行提示错误
Microsoft VBScript 编译器错误 (0x800A0408)
无效字符
/showkf.asp, line 2, column 30
if request.form("submit")="录入" then

[此贴子已经被作者于2006-1-1 0:49:15编辑过]

搜索更多相关主题的帖子: 代码 
2006-01-01 00:49
mojian0820
Rank: 1
等 级:新手上路
帖 子:34
专家分:0
注 册:2005-11-28
得分:0 
我这个按钮没问题啊

2006-01-01 00:55
mojian0820
Rank: 1
等 级:新手上路
帖 子:34
专家分:0
注 册:2005-11-28
得分:0 
问题已经被我解决了!

2006-01-01 01:10



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-41170-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.102455 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved