?? addnews.aspx
字號:
<%@ Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<%@ Register TagPrefix="uc1" TagName="AdminNewsHeader" Src="../Inc/AdminNewsHeader.ascx" %>
<%@ Register TagPrefix="uc1" TagName="AdminFooter" Src="../Inc/AdminFooter.ascx" %>
<%@ Page language="c#" Codebehind="AddNews.aspx.cs" AutoEventWireup="false" Inherits="Zj.Web.Admin.AddNews" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title> <%=WebName%> ·新聞管理</title>
<LINK href="Style/default.css" type="text/css" rel="stylesheet">
<SCRIPT language="javascript">
<!--
function IsShowSummary()
{
with(document.Form1)
{
if (ChkIsPicture.checked == true)
{
document.all['TrSummary'].style.display = "";
}
else
{
document.all['TrSummary'].style.display = "none";
}
}
}
function CheckInput()
{
with(document.Form1)
{
if(DropCat.value==0)
{
alert("請選擇新聞類別!");
DropCat.focus();
return false;
}
if(txtTitle.value=='')
{
alert("請輸入新聞標題!");
txtTitle.focus();
return false;
}
if(document.all['TrSummary'].style.display == "") //控件存在
{
if(txtSummary.value=='')
{
alert("請輸入新聞?wù)?quot;);
txtSummary.focus();
return false;
}
}
if(txtAuthor.value=='')
{
alert("請輸入新聞作者!");
txtAuthor.focus();
return false;
}
if(ftbContent.value=='')
{
alert("請輸入新聞內(nèi)容!");
//ftbContent.focus();//不要加這句,加上之后會post到服務(wù)器端
return false;
}
} //end with
}
//-->
</SCRIPT>
</HEAD>
<body topMargin="0">
<form id="Form1" onsubmit="return CheckInput()" method="post" runat="server">
<uc1:adminnewsheader id="AdminNewsHeader1" runat="server" DESIGNTIMEDRAGDROP="61"></uc1:adminnewsheader>
<TABLE id="Table1" cellSpacing="0" cellPadding="0" width="770" align="center" border="0">
<TR>
<TD align="center" colSpan="2"><FONT face="黑體"><STRONG>添加新聞</STRONG></FONT></TD>
</TR>
<TR>
<TD align="center" colSpan="2"><FONT face="宋體"><FONT face="宋體">
<asp:label id="lblMsg" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="Red"></asp:label></FONT></FONT></TD>
</TR>
<TR>
<TD align="left" width="67"><FONT face="宋體">所屬分類<FONT color="red">*</FONT></FONT></TD>
<TD><asp:dropdownlist id="DropCat" runat="server"></asp:dropdownlist> <FONT face="宋體">圖片新聞<INPUT id="ChkIsPicture" onclick="IsShowSummary();" type="checkbox" value="1" name="ChkIsPicture"></FONT></TD>
</TR>
<TR>
<TD align="left" width="67">新聞標題<FONT color="red">*</FONT></TD>
<TD><asp:textbox id="txtTitle" runat="server" Width="699px" MaxLength="50"></asp:textbox></TD>
</TR>
<TR id="TrSummary" style="DISPLAY: none">
<TD vAlign="top" align="left" width="67"><FONT face="宋體">新聞?wù)?lt;/FONT></TD>
<TD><FONT face="宋體"><asp:textbox id="txtSummary" runat="server" Width="699px" TextMode="MultiLine" Height="40px"
MaxLength="800"></asp:textbox></FONT></TD>
</TR>
<TR>
<TD align="left" width="67"><FONT face="宋體">新聞編輯<FONT color="red">*</FONT></FONT></TD>
<TD><asp:textbox id="txtAuthor" runat="server" Width="146px" MaxLength="20"></asp:textbox> </TD>
</TR>
<TR>
<TD align="left" width="67">新聞來源</TD>
<TD><asp:textbox id="txtFrom" runat="server" Width="226px" MaxLength="30"></asp:textbox></TD>
</TR>
<TR>
<TD align="left" width="67"><FONT face="宋體">新聞關(guān)鍵字</FONT></TD>
<TD><asp:textbox id="txtKeyWord" runat="server" Width="143px" MaxLength="20"></asp:textbox><FONT color="#ff3300">
可以不添,用于區(qū)分相關(guān)新聞.(多個關(guān)鍵字請用空格,分號(半角/全角)分隔)</FONT></TD>
</TR>
<TR>
<TD vAlign="top" align="left" width="67">新聞內(nèi)容<FONT color="red">*</FONT></TD>
<TD>
<ftb:freetextbox id="ftbContent" runat="server" Width="700px" Height="320px" ImageGalleryPath="News/UploadImages"
ButtonPath="../../ftb/office2000/" ToolbarType="OfficeXP"></ftb:freetextbox>
</TD>
<TR>
<TD align="left" width="67"><FONT face="宋體">是否通過</FONT></TD>
<TD><FONT face="宋體"><INPUT id="chkState" type="checkbox" value="1" name="chkState" runat="server"></FONT></TD>
</TR>
<TR>
<TD align="center" colSpan="2"><asp:button id="btnAdd" runat="server" Text="添加"></asp:button> <INPUT type="reset" value="取消"></TD>
</TR>
</TABLE>
<table height="6" cellSpacing="0" cellPadding="0" width="770" align="center" border="0">
<tr>
<td bgColor="#8d0294" height="3"></td>
</tr>
</table>
<table height="20" cellSpacing="0" cellPadding="0" width="770" align="center" border="0">
<tr bgColor="#e7e7e7">
<td align="center" width="894"><FONT face="宋體">
<uc1:AdminFooter id="AdminFooter1" runat="server"></uc1:AdminFooter></FONT></td>
</tr>
</table>
</form>
</body>
</HTML>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -