📄 addnote.asp
字号:
<!-- #include file="include/adovbs.inc" -->
<!-- #include file="include/dataconn.asp" -->
<!-- #include file="common.asp" --><title>添加记录</title><style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
a:link {
color: #000000;
}
a:visited {
color: #000000;
}
-->
</style>
<br><br><br><br>
<%
if request.QueryString="add" then
title=request.form("title")
content=request.form("content")
uid=request.Form("userid")
'HTML支持
function htmlencode(str)
htmlencode=server.htmlencode(str)
htmlencode=replace(replace(htmlencode,chr(13),"<br>"),"'","’")
end function
set rs=server.createobject("adodb.recordset")
sqltext="select * from notes"
rs.open sqltext,conn,3,3
rs.addnew
rs("uid")=uid
rs("title")=htmlencode(title)
rs("content")=htmlencode(content)
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<script>alert(""添加成功,确认!"");location.href=""notes.asp"";</script>"
else
userid=session("HyID")
%>
<form action="addnote.asp?add" method="post" name="addnote" target="_self" id="addnote">
<table width="500" border="1" align="center" cellPadding="0" cellSpacing="0" bordercolor="#111111" style="border-collapse: collapse">
<tbody>
<tr>
<td bgColor="#01438b" height="3"></td></tr>
<tr>
<td height="25" align="center" bgColor="#88AFD7" class="style2"><strong>添加记录</strong></td>
</tr>
</tbody></table>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td width="79" height="30" align="center" bgcolor="#FFFFFF">标题</td>
<td width="418" bgcolor="#FFFFFF"><input name="title" type="text" id="title" size="50"></td>
</tr>
<tr>
<td height="30" align="center" bgcolor="#FFFFFF">内容</td>
<td height="30" bgcolor="#FFFFFF"><textarea name="content" cols="50" rows="10" id="content"></textarea></td>
</tr>
<tr align="center">
<td height="30" colspan="2" bgcolor="#FFFFFF"><input type="submit" name="Submit" value="保存">
<input type="button" name="Submit2" value="返回" onClick="history.back()"></td>
</tr>
</table>
<input type="hidden" name="userid" value="<%=userid%>" >
</form>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -