?? newsadd.asp
字號(hào):
<!--#include File="ConnDB.asp"-->
<!--#include File="ChkPwd.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加新聞</title>
<link rel="stylesheet" href="style.css">
<script language="javascript">
function form_onsubmit(obj)
{
ValidationPassed = true;
if(obj.Cate.selectedIndex <0) {
alert("請(qǐng)選擇新聞?lì)悇e")
ValidationPassed = false;
return ValidationPassed;
}
if(obj.title.value == "") {
alert("請(qǐng)?zhí)顚懶侣剺?biāo)題");
ValidationPassed = false;
return ValidationPassed;
}
if(obj.txtcontent.value == "") {
alert("請(qǐng)?zhí)顚懶侣剝?nèi)容!");
ValidationPassed = false;
return ValidationPassed;
}
}
</script>
</head>
<body>
<p align="center"><font color=red style="font-family: 宋體; font-size: 11pt"><b>添加新聞</b></font></p>
<form action="newsSave.asp" method="POST" name="myform" align="center" onsubmit="return ValidationPassed">
<table border="1" width="98%" align=center bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" bordercolor="#FFFFFF" cellspacing="1" style="margin-top: 0; margin-bottom: 0">
<tr>
<td><b>分類</b></td><td>
<select name="Cate">
<%
Set rs = Server.CreateObject("ADODB.RecordSet")
'將新聞?lì)悇e裝入下拉菜單中
sql = "SELECT * FROM Category ORDER BY CateId"
Set rsCate = Conn.Execute(sql)
DO WHILE Not rsCate.EOF
stitle = rsCate("CateName")
cid = rsCate("CateId")
%>
<option value="<%=cid%>"><%=stitle%></option>
<%
rsCate.movenext
LOOP
%>
</select>
</td>
</tr>
<tr>
<td><b>題目</b></td><td> <input type="text" name="title" size="40">
<input type="checkbox" name="attpic" value="1">附圖</td>
</tr>
<tr>
<td width="19%" height="30" align=left><b>照片上傳</b></td>
<td width="81%" height="30"><iframe frameborder="0" width="400" height="30" scrolling="no" src="upload.asp" ></iframe>
</td>
</tr>
<tr>
<td align="center" height="30" colspan=2>
<!--#include file="template.asp"-->
</td>
</tr>
<tr>
<td align="left"><b>內(nèi)容</b></td>
<td>
<textarea rows="22" name="txtcontent" cols="60"></textarea>
</td>
</tr>
</table>
<p align=center><input type="submit" value=" 確 定 " name="B1" onclick="return form_onsubmit(this.form)">
<input type="reset" value=" 取 消 " name="cmdcancel"></p>
</form>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -