ASP表单问题
<!--#includefile="conn.asp"--><%jt_name=trim(request.form("tj_name"))Response.Write(t...
<!--#include file="conn.asp"-->
<%
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 "<a href='tsjy.asp' >返回-重填</a>"
Response.Write jt_title
end if
%>
请问为什么总值不了表单的值呢?谢谢!
表单代码如下
<!--#include file="conn.asp"-->
<%
if session("username")="" then
jt_name="游客"
else
jt_name=session("username")
end if
%>
<form name="form" method="post" action="tsjyok.asp">
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#CCCCCC">
<td width="93"><div align="center">标题:</div></td>
<td width="280" height="30" align="center"><label>
<input name="jt_title" type="text" size="40">
</label></td>
<td width="200">用户名:
<label>
<input name="jt_name" type="text" value="<%=jt_name%>" size="13">
</label></td>
</tr>
<tr>
<td><div align="center">内容</div></td>
<td colspan="2" align="center"><br><label>
<textarea name="jt_conter" cols="70" rows="13"></textarea>
</label></td>
</tr>
<tr>
<td height="40" bgcolor="#CCCCCC"> </td>
<td colspan="2" bgcolor="#CCCCCC"><table width="96%" border="0" cellspacing="0" cellpadding="0" height="25">
<tr valign="bottom">
<td><label>
<input name="radio" type="radio" value="1" checked>
</label>建议</td>
<td><label>
<input type="radio" name="radio" value="0">
</label>投诉</td>
<td></td>
<td><label>
<input style="width:80" type="submit" name="Submit" value="提交">
</label>
<label>
<input type="hidden" name="hiddenField">
<input type="reset" name="Submit2" value="重写" style="width:80">
</label></td>
</tr>
</table></td>
</tr>
</table>
</form>
是啊,什么提示也没有,结果就是执行了两者为空的情况. 展开
<%
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 "<a href='tsjy.asp' >返回-重填</a>"
Response.Write jt_title
end if
%>
请问为什么总值不了表单的值呢?谢谢!
表单代码如下
<!--#include file="conn.asp"-->
<%
if session("username")="" then
jt_name="游客"
else
jt_name=session("username")
end if
%>
<form name="form" method="post" action="tsjyok.asp">
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#CCCCCC">
<td width="93"><div align="center">标题:</div></td>
<td width="280" height="30" align="center"><label>
<input name="jt_title" type="text" size="40">
</label></td>
<td width="200">用户名:
<label>
<input name="jt_name" type="text" value="<%=jt_name%>" size="13">
</label></td>
</tr>
<tr>
<td><div align="center">内容</div></td>
<td colspan="2" align="center"><br><label>
<textarea name="jt_conter" cols="70" rows="13"></textarea>
</label></td>
</tr>
<tr>
<td height="40" bgcolor="#CCCCCC"> </td>
<td colspan="2" bgcolor="#CCCCCC"><table width="96%" border="0" cellspacing="0" cellpadding="0" height="25">
<tr valign="bottom">
<td><label>
<input name="radio" type="radio" value="1" checked>
</label>建议</td>
<td><label>
<input type="radio" name="radio" value="0">
</label>投诉</td>
<td></td>
<td><label>
<input style="width:80" type="submit" name="Submit" value="提交">
</label>
<label>
<input type="hidden" name="hiddenField">
<input type="reset" name="Submit2" value="重写" style="width:80">
</label></td>
</tr>
</table></td>
</tr>
</table>
</form>
是啊,什么提示也没有,结果就是执行了两者为空的情况. 展开
2个回答
展开全部
把
<%
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 "<a href='tsjy.asp' >返回-重填</a>"
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 "<a href='tsjy.asp' >返回-重填</a>"
Response.Write jt_title
end if
%>
<%
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 "<a href='tsjy.asp' >返回-重填</a>"
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 "<a href='tsjy.asp' >返回-重填</a>"
Response.Write jt_title
end if
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询