⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 postnews.asp

📁 原代码 原代码 原代码 原代码 原代码
💻 ASP
字号:
<!--#include file="conn.inc"-->
<%
sql="select * from cadre_info where rank='支队领导' or rank='部门领导'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻标题</title>
<link rel="stylesheet" type="text/css" href="css.css">
<script language="javascript">
function openeditor(){
  if (navigator.appName!="Microsoft Internet Explorer")
    alert("此功能Netscape用户不能使用!")
  else
    {
    newwin=window.open('editor/editor.html','','width=544,height=294');
     newwin.focus();
    }
} 
function submitit()
{
var myform=document.newsform;
  if (myform.title.value=="")
  {
    alert("新闻标题不能为空!");
    return false;
  }
  else
  {
    if (myform.text.value=="")
    {
      alert("新闻正文不能为空!");
      return false;
    }
    else
    {
      if (myform.youxq.value=="")
      {
      alert("有效期不能为空!");
      return false;
      }
      else
      {
        if (myform.shenhr.value=="")
        {
          alert("送交谁审核不能为空!");
          return false;
        }
        else
        {
          return true;
        }
      }
    }
  }
}
</script>
</head>

<body>

<table cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3" height="25">
  <tr>
    <td width="100%">当前位置:<a href="news.asp">系统管理</a> &gt; 新闻发布</td>
  </tr>
</table>
<table border="1" cellspacing="1" style="border-collapse: collapse" id="AutoNumber1" cellpadding="0" bordercolor="#C0C0C0">
  <form name="newsform" method="POST" action="savenews.asp" onsubmit="return submitit();">
    <tr>
      <td width="80" align="right" height="30" bgcolor="#EFEFEF">新闻标题:</td>
      <td width="480">
      <input type="text" name="title" size="75" onblur="this.className='inputnormal'" onfocus="this.className='inputedit';this.select()" class="inputnormal"></td>
    </tr>
    <tr>
      <td align="right" height="240" bgcolor="#EFEFEF">新闻正文:<p align="center">[<a href="javascript:openeditor();">超级编辑器</a>]</td>
      <td>
      <textarea rows="15" name="text" cols="65" class="inputnormal" readonly></textarea></td>
    </tr>
    <tr>
      <td align="right" height="30" bgcolor="#EFEFEF">有效期:</td>
      <td>
      <input type="text" name="youxq" size="12" onkeyup="if(isNaN(this.value)) this.value='';" onblur="this.className='inputnormal'" onfocus="this.className='inputedit';this.select()" class="inputnormal"></td>
    </tr>
    <tr>
      <td align="right" height="30" bgcolor="#EFEFEF">送交谁审核:</td>
      <td><select size="1" name="shenhr">
      <option></option>
      <% do while not rs.eof %>
      <option value="<%=rs("userid")%>"><%=rs("username")%></option>
      <% rs.movenext
      loop
      rs.close %></select></td>
    </tr>
    <tr>
      <td width="100%" cols="2" colspan="2">
      <p align="center"><input type="submit" value="提交" name="B1" class="s02">&nbsp;
      <input type="reset" value="重置" name="B2" class="s02"></td>
    </tr>
  </form>
</table>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -