rs("nam01")=trim(request("nam02"))&trim(request("nam03"))&nma04
如果要让nam01字段的数值等于"nam02" "nam03" "nam04"的和该怎么表示啊
还是不太明白,偶太菜了,这是偶得程序怎么算出不是和而是数字排起来(nam02=20 nam03=30 nam04=40 ,nam01则=2030怎么能让nam01=90呀 ,也就是的等于nam02+nam03+nam04的和)
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script LANGUAGE='javascript'>alert('网络超时或者您还没有登录请登录');window.location.href='login.asp';</script>"
response.End
end if
function GetPicUrl(sContent)
if instr(sContent,"<IMG")>0 then
i=1
do while i<len(sContent) and i<>0
ss=instr(i,sContent,"<IMG")
if ss=0 then
exit do
end if
dd=instr(ss,sContent,"src=")
bb=instr(dd+5,Scontent,chr(34))
yy=yy & "|" & mid(sContent,dd+5,bb-dd-5)
i=bb
loop
end if
if len(yy)>2 then
pics=split(yy,"|")
GetPicUrl=Pics(1)
else
GetPicUrl=""
end if
end function
if request.QueryString("action")="save" then
set rs=server.CreateObject("adodb.recordset")
if request("selectpic")="" then
selectpic=0
else
selectpic=cint(request("selectpic"))
end if
rs.open "select * from soft",conn,1,3
rs.addnew
rs("newsnum")=trim(request("newsnum"))
rs("nam02")=trim(request("nam02"))
rs("nam03")=trim(request("nam03"))
rs("nam04")=trim(request("nam04"))
rs("nam01")=trim(request("nam02"))&trim(request("nam03"))&nam04
Content=Request.Form("Content")
'将里面的链接换成本地链接
aa="http://"&Request.ServerVariables("server_name")&Request.ServerVariables("path_info")
aa= mid(aa,1,len(aa)-17) '16=admin/addsoft.asp
'response.write aa
'response.end
content=replace(content,aa,"")
session("content")=content
rs("content")=content
rs("scontent")=trim(request("newsnum"))&content
if selectpic=1 then
else
rs("softurl")=""
end if
'response.end
rs("dateandtime")=now()
rs("hits")=0
rs("softurl")=Request.Form("softurl")
rs.update
rs.close
set rs=nothing
session("content")=""
response.write "<script language=javascript>alert('添加成功!');window.location.href='addsoft.asp';</script>"
response.End
end if
%>
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<table class="tableBorder" width="1024" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td align="center" background="../images/admin_bg_1.gif" height="25"><b><font color="#ffffff">添加资料</font></b></td>
</tr>
<tr>
<td valign="top">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<form name="form1" method="post" action="addsoft.asp?action=save" onSubmit="return checkdata()" onReset="return ResetForm();">
<tr bgcolor="#E8F1FF">
<td width="9%" align="center"><div align="center">
<input name="nam02" type="text" id="nam02" value="0" size="10">
</div></td>
<td width="9%" ><div align="center">
<input name="nam03" type="text" id="nam032" value="0" size="10">
</div></td>
<td width="9%" ><div align="right">
<input name="nam04" type="text" id="nam042" value="0" size="10">
</div></td>
</tr>
<tr bgcolor="#E8F1FF">
<td align="center"><div align="center"></div></td>
<td ><div align="center">
<script language="javascript">
document.write ('<iframe src="../textbox2.asp?action=new" id="message" width="0" height="0"></iframe>')
frames.message.document.designMode = "On";</script>
</div></td>
<td ><input type="submit" name="Submit" value="添加" onClick="document.form1.Content.value = frames.message.document.body.innerHTML;">
<input onclick="ClearReset()" type=reset name="Clear" value="重新填写">
<input type="hidden" name="Content" value=""> </td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</body>
</html>