问一下,这个看起来很简单的代码书写
<%Function getForm(element,ftype)
Select case ftype
case "get"
getForm=Trim(Request.QueryString(element))
case "post"
getForm=Trim(Request.Form(element))
case "both"
if IsNull(Request.QueryString(element)) then getForm=Trim(Request.Form(element)) else getForm=Trim(Request.QueryString(element))
End Select
End Function
Select Case ReplaceBadWord(Request.QueryString("Dst"))
case "Rzadd"
if Request("dot")="Asave" then
Dim Ntype:Ntype=Clng(getForm(type,"post")):if Ntype="" Then GoError("收支必选!")
Dim NDT_Date:NDT_Date=getForm(DT_Date,"post")
Conn.Execute("Insert into [price]([body],[type]) Values ('"&Nbody&"',"&Ntype&")")
Response.redirect "iz.Asp"
end if
%>
<table width="60%" class="Dit_table">
<form method="post" id="Rzadd" name="Rzadd" action="?Dst=Rzadd&dot=Asave">
<tr>
<td valign="top"><b>日志内容:</b></td>
<td><textarea id="body" name="body"></textarea></td>
</tr>
<tr>
<td><b>日志金额:</b></td>
<td><select name="type" id="type">
<option value="">收支类型</option>
<option value="1">支出款</option>
<option value="0">收入款</option>
</select></td>
</tr>
<tr>
<td> </td>
<td><input name="Sumbit" type="submit" class="btn" value="提 交" /></td>
</tr>
</form>
</table>
<%End Select%>