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

求救,没有分了见谅,关于把一个post之外的值输入数据库。
<!--#include file="conn.asp"-->
<!--#include file="checkright.asp"-->
<!--#include file="Function.asp"-->
<script>
function $(a1){return document.getElementById(a1);}
function show()
{
t0 = $("t").value;
t1 = $("t1").value;
t2 = $("t2").value;
t9 = t1 + ","+ t2 + "\n" + t0;
$("texta1").innerText = t9;
//text.innerHTML = t;
$("t").value = t9;
//alert($("t").value);
}
</script>
<%
dim azhou
azhou = now()

Session("oper")="基础数据 &gt;&gt; 员工管理 &gt;&gt; 新增"
If Request.ServerVariables("REQUEST_METHOD")="POST" Then
EmployNo=Trim(Request("EmployNo"))
Set rs=CreateObject("ADODB.RecordSet")
sql="Select * From 职员 Where 工号='"& EmployNo &"'"
rs.Open sql,conn,1,3
If Not rs.EOF Then
Response.Write "<script language='javascript'>"
Response.Write "alert('此工号已存在,请重新输入');"
Response.Write "</script>"
Else
rs.Close
rs.Open "职员",conn,1,3
rs.AddNew
rs("工号")=EmployNo
rs("姓名")=Trim(Request("EmployName"))
rs("出生年月")=ChkDate(Request("Birthday"))
rs("籍贯")=Trim(Request("NativePlace"))



rs("邮政编码")=Trim(Request("Postcode"))
rs("Email")=Trim(Request("Email"))

rs("部门")=Trim(Request("Department"))
rs("职务")=Trim(Request("Position"))
rs("状态")=Trim(Request("EmployStatus"))

rs("备注")=ChkText(Request("texta1"))
rs.Update
End If
Set rs=NoThing

Response.Redirect "editemp.asp"
End If
%>



。中间省去的不重要的东西。

。<td><form name="frm" action="" method="post" onSubmit="return checkinput()">
。.............................................
 <td align="center">备&nbsp;&nbsp;注</td>
  <td colspan="3"><input name="t1" type="text" id="t1" value="请输入价格">
<input name="t2" type="text" id="t2" value="请输入天数">
  <input type="button" name="button" id="button" value="添加" onClick="return show();" />
<input type="reset" name="Submit" value="删除">
<label>
<textarea name="texta1" rows="5" id="text"></textarea> ---------这里是texa1
</label>
<input name="t" type="hidden" id="t" value=""> </td>
  </tr>
  </table>
  <label> <br>
  </label>
  <table align="center" width="500" border="0" cellpadding="0" cellspacing="0">
  <tr align="center">
  <td>&nbsp;<input name="submit" type="submit" class="botton" value="我写完了">
  &nbsp;&nbsp;
&nbsp;<input name="reSet" type="reSet" class="botton" value="重置"></td>





我现在怎么把texta1里的内