repadd.asp
来自「基于IIS+ASP的」· ASP 代码 · 共 26 行
ASP
26 行
<!--#include file="conn.asp"-->
<%
title=trim(request("title"))
content=trim(request("content"))
if request("title")="" then
Response.Write("<script>alert('请输入您的姓名!');history.back();</script>")
response.End()
end if
if request("content")="" then
Response.Write("<script>alert('请输入您的留言内容!');history.back();</script>")
response.End()
end if
sql="insert into news(title,content,class) values('"&title&"','"&content&"','1')"
conn.execute sql
if err=0 then
Response.Write("<script>alert('留言成功!');window.location='rep.htm';</script>")
Response.end
else
Response.Write("<script>alert('留言失败!');history.back()</script>")
Response.end
end if
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?