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

📄 editnews.asp

📁 商城源码程序(上海数字商城整站) 功能列表: 商品管理
💻 ASP
字号:
<!--#include file="conn.asp"-->

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<SCRIPT LANGUAGE="JavaScript">
<!--
function chechform()
{
   if(checkspace(document.userinfo.news_title.value)) {
	
    alert("对不起,请填写新闻标题!");
	document.userinfo.news_title.focus();
	return false;
  }
     if(checkspace(document.userinfo.typeid.value)) {
	
    alert("对不起,请选择所属类别!");
	document.userinfo.typeid.focus();
	return false;
  }

}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

//-->
</script>
<%newsid=trim(Request("newsid"))
set rss=server.createobject("adodb.recordset")
sql="select * From news where newsid="&newsid
rss.open sql,conn,1,1%>
<form name="userinfo" method="post" action="save_news.asp?action=edit&newsid=<%=newsid%>">
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="6699cc">
  <tr>
    <td height="25" colspan="2" align="center">编辑新闻</td>
  </tr>
  <tr>
    <td width="15%" height="25" align="center">新闻标题:</td>
    <td>
      <input name="news_title" type="text" size="40" value="<%=rss("news_title")%>">
    
    </td>
  </tr>
  <tr>
    <td height="25" align="center">新闻内容:</td>
    <td><INPUT type="hidden" name="news_content"  value="<%=server.HTMLEncode(rss("news_content"))%>">	
        <iframe ID="Editor" name="Editor" src="HtmlEditor/index.html?ID=news_content" frameBorder="0" marginHeight="0" marginWidth="0" scrolling="No" style="height:320px;width:600px"></iframe> </td>

      </td>
  </tr>
  <tr>
    <td height="25" align="center">所属类别:</td>
    <td><select name="typeid">
	
	<%sql="select * from newsclass"
	  set rs=server.CreateObject("adodb.recordset")
	  rs.open sql,conn,1,1
	  if rs.eof and rs.bof then%>
      <option value="">暂无类别</option>
	  <%else
	    do while not rs.eof%>
      <option value="<%=rs("typeid")%>" <%if trim(rs("typeid"))=trim(rss("typeid")) then%>selected<%end if%>><%=rs("news_type")%></option>
	  <%rs.movenext
	    loop
		end if
		rss.close:set rss=nothing%>
    </select>
    </td>
  </tr>
  <tr>
    <td height="25" colspan="2" align="center"><input type="submit" name="Submit" value="保存" onClick="return chechform();"></td>
  </tr>
</table></form>
<%rs.close:set rs=nothing%>
</body>
</html>

⌨️ 快捷键说明

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