?? news.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="session.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>無標題文檔</title>
</head>
<body oncontextmenu="return false" onselectstart="return false" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
<script laguage="javascript">
<!--
function form1_onsubmit()
{
if (document.form1.dy_name.value=="")
{
alert("出處不能為空!")
document.form1.dy_name.focus()
return false
}
else if(document.form1.dy_content.value=="")
{
alert("新聞內容不能為空!")
document.form1.dy_content.focus()
return false
}
}
-->
</script>
<form name="form1" method="post" action="news.asp" onSubmit="return form1_onsubmit()">
<table width="497" height="190" border="0" cellpadding="0" cellspacing="1" bgcolor="#FF0000">
<tr align="center" bgcolor="#009900">
<td height="29" colspan="2"><font color="#FFFFFF">新聞更新</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="141" align="right">來自:</td>
<td width="353"><input name="dy_name" type="text" id="dy_name"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="86" align="right">新聞內容:</td>
<td align="left" valign="top"><textarea name="dy_content" cols="20" rows="5" id="dy_content"></textarea></td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td colspan="2">
<input type="submit" name="submit" value="提交">
<input type="reset" name="submit2" value="重置"></td>
</tr>
</table>
</form>
<% if request.form("submit")="提交" then
dy_name=trim(request.form("dy_name"))
dy_content=trim(request.form("dy_content"))
if dy_name="" or dy_content="" then
%>
<script language="JavaScript">
alert("出處和內容必須寫!")
history.go(-1)</script><%
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from dy_news"
rs.open sql,conn,3,3
rs("dy_name")=dy_name
rs("dy_content")=dy_content
rs.update
%>
<script language="JavaScript">
alert("新聞更新成功!")
window.location.href("main.htm")</script>
<% rs.close
set rs=nothing
conn.close
set conn=nothing
end if
end if%>
</div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -