ASP表单问题

2024-11-28 00:40:30
推荐回答(2个)
回答(1):


<%
jt_name=trim(request.form("tj_name"))
Response.Write (tj_name)
jt_title=trim(request.Form("tj_title"))
jt_conter=trim(request.Form("jt_conter"))
jort=request.Form("radio")

if jt_title<>"" and jt_coter<>"" then
set rsjt=server.CreateObject("adodb.recordset")
rsjt.open "select * from bjx_jt",conn,1,3
rsjt.addnew
rsjt("jt_name")=jt_name
rsjt("jt_title")=jt_title
rsjt("jt_conter")=jt_conter
rsjt("jort")=jt_jort
rsjt.update
rsjt.close
set rsjt=nothing
else
Response.Write("为了确保您的信息得到尽快的处理,请填写完整信息后再提交!")
Response.Write "返回-重填"
Response.Write jt_title
end if
%>

改为:
<%
jt_name=trim(request.form("jt_name"))
Response.Write (jt_name)
jt_title=trim(request.Form("jt_title"))
jt_conter=trim(request.Form("jt_conter"))
jort=request.Form("radio")

if jt_title<>"" and jt_coter<>"" then
set rsjt=server.CreateObject("adodb.recordset")
rsjt.open "select * from bjx_jt",conn,1,3
rsjt.addnew
rsjt("jt_name")=jt_name
rsjt("jt_title")=jt_title
rsjt("jt_conter")=jt_conter
rsjt("jort")=jt_jort
rsjt.update
rsjt.close
set rsjt=nothing
else
Response.Write("为了确保您的信息得到尽快的处理,请填写完整信息后再提交!")
Response.Write "返回-重填"
Response.Write jt_title
end if
%>

回答(2):

看一下你的tj , jt 都混淆了 当然得不到值了 你request.form("")里面都是tj而表单名称都是jt 你说能有值吗? 好多地方都混淆了 你可以检查一下