📄 bulletinedit.asp
字号:
<!--#include File="../ConnDB.asp"-->
<!--#include File="../class/Bulletin.asp"-->
<!--#include file="isAdmin.asp"-->
<html>
<head>
<title>公告</title>
<link href=../style.css rel=STYLESHEET type=text/css>
<script language="javascript">
function checkFields()
{
if (myform.title.value=="") {
alert("公告题目不能为空");
myform.title.onfocus();
return false;
}
if (myform.content.value=="") {
alert("公告内容不能为空");
myform.content.onfocus();
return false;
}
return true;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
body,td,th {
color: #D4D0C8;
}
body {
background-color: #FFFFFF;
}
.STYLE1 {color: #000000}
-->
</style></head>
<body>
<%
'从数据库中取得此公告信息
Dim id,rs,sql
'读取参数id
id = Request.QueryString("id")
'根据参数id读取指定的公告信息
set obj = new Bulletin
obj.GetBulletinInfo(id)
'如果记录集为空,则显示没有此公告
If obj.Id = 0 Then
Response.Write "没有此公告"
'结束网页输出
Response.End
Else
'替换公告内容中的特殊字符
content=Replace(obj.Content,"<br>",chr(13))
content=Replace(content," "," ")
'下面内容是在表格中显示公告内容
%>
<form name="myform" method="POST" action="BulletinSave.asp?action=update&id=<%=id%>" OnSubmit="return checkFields()">
<table border="0" width="100%" cellspacing="1">
<tr>
<td width="100%" bgcolor="#FFFFFF"><span class="STYLE1">公告标题
<input type="text" name="title" size="20" value="<%=obj.Title%>">
</span></td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF"><span class="STYLE1">公告内容</span></td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF"><textarea rows="12" name="content" cols="55"><%=content%></textarea></td>
</tr>
</table>
<p align="center"><input type="submit" value=" 提 交 " name="B1">
<input type="reset" value=" 重写 " name="B2"></p>
<%
End If
%>
</form>
<% set obj = Nothing %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -