?? addnews.jsp
字號(hào):
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<SCRIPT language=JavaScript>
<!--
function openwin(url, width, height)
{
var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=1,menubar=0,status=1');
}
function addimages()
{
var post=prompt("請(qǐng)輸入您上傳的圖片路徑","完整的地址");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[img]"+post+"[/img]";
}
}
function aaa()
{
document.post.content.value=document.post.content.value+"[img]"+<%=session.getAttribute("image")%>+"[/img]";
}
function addMood(mood)
{
document.post.content.value=document.post.content.value+mood;
}
function addBold()
{
var post=prompt("輸入要加粗的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[b]"+post+"[/b]";
}
}
function addEm()
{
var post=prompt("輸入要傾斜的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[i]"+post+"[/i]";
}
}
function addCenter()
{
var post=prompt("輸入要居中顯示的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[center]"+post+"[/center]";
}
}
function addLeft()
{
var post=prompt("輸入要左對(duì)齊的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[left]"+post+"[/left]";
}
}
function addRight()
{
var post=prompt("輸入要右對(duì)齊的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[right]"+post+"[/right]";
}
}
function addURL()
{
var post=prompt("請(qǐng)輸入完整的地址\n比如http://www.jzhzg.com","完整的地址");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[url]"+post+"[/url]";
}
}
function addEmail()
{
var post=prompt("請(qǐng)輸入完整的郵件地址\n比如hack520vip@21cn.com","完整的地址");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[email]"+post+"[/email]";
}
}
function addQuote()
{
var post=prompt("請(qǐng)輸入引用的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[quote]"+post+"[/quote]";
}
}
function setFont(font)
{
var post=prompt("請(qǐng)輸入想改變字體的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[font="+font+"]"+post+"[/font]";
}
}
function setSize(size)
{
var post=prompt("請(qǐng)輸入想改變大小的文字","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"[size="+size+"]"+post+"[/size]";
}
}
function setColor(color)
{
var post=prompt("文字染色","文字");
if(post!=null)
{
document.post.content.value=document.post.content.value+"["+color+"]"+post+"[/"+color+"]";
}
}
-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>添加新聞</title>
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
.STYLE1 {color: #FFFFFF}
#Layer1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
left: 280px;
top: 144px;
}
-->
</style></head>
<body>
<form action="/meikuang/addNews.do" method="post" enctype="multipart/form-data" name="post" id="form1">
<table width="662" height="146" border="1" align="center">
<tr>
<td width="652" height="49" bgcolor="#0000FF"><label></label>
<label>
<div align="center"><span class="STYLE1">添 加 新 聞</span></div>
</label></td>
</tr>
<tr>
<td width="652" height="49"><label>新聞標(biāo)題:
<input name="title" type="text" id="title" size="30" />
</label>
<label>*</label></td>
</tr>
<tr>
<td height="38">作者:
<label>
<input name="users" type="text" id="textfield" size="30" />
</label></td>
</tr>
<tr>
<td height="38">新聞?lì)悇e:
<label>
<select name="classes">
<option>選擇新聞?lì)悇e</option>
<option value="1">領(lǐng)導(dǎo)講話</option>
<option value="2">檢查動(dòng)態(tài)</option>
<option value="3">行業(yè)動(dòng)態(tài)</option>
<option value="4">安全評(píng)估</option>
<option value="5">傷亡事故</option>
</select>
</label></td>
</tr>
<tr>
<td height="38">上傳圖片:
<label>
<a href="JavaScript:openwin('up.jsp',600,500)">點(diǎn)擊上傳圖片
</a> <a href="JavaScript:aaa()">點(diǎn)擊加入圖片</a></label></td>
</tr>
<tr>
<td height="49" bgcolor="#ECE9D8"><div align="center">
<p>新聞內(nèi)容*</p>
<p><select name="selectFont" id="selectFont" onChange="setFont(this.options[this.selectedIndex].value)">
<option selected>選擇字體</option>
<option value="宋體">宋體</option>
<option value="黑體">黑體</option>
<option value="隸書(shū)">隸書(shū)</option>
<option value="幼圓">幼圓</option>
<option value="仿宋_GB2312">仿宋_GB2312</option>
<option value="Arial">Arial</option>
<option value="Times New Roman">Times New Roman</option>
</select>
<select name="selectSize" id="selectSize" onChange="setSize(this.options[this.selectedIndex].value)">
<option selected>字體大小</option>
<option value="6">6</option>
<option value="8">8</option>
<option value="10">10</option>
<option value="12">12</option>
<option value="14">14</option>
<option value="18">18</option>
<option value="24">24</option>
<option value="36">36</option>
</select>
<select name="selectColor" id="selectColor" onChange="setColor(this.options[this.selectedIndex].value)">
<option value="" selected>選擇顏色</option>
<option value="red">紅色</option>
<option value="blue">藍(lán)色</option>
<option value="yellow">黃色</option>
<option value="green">綠色</option>
</select>
<a href="javascript:" onClick="addBold()"><img src="images/ubb/bold.gif" alt="字體加粗" width="20" height="20" border="0"></a>
<a href="javascript:" onClick="addEm()"><img src="images/ubb/italic.gif" alt="字體傾斜" width="20" height="20" border="0"></a>
<img src="images/ubb/separator.gif" width="6" height="20"> <a href="javascript:" onClick="addLeft()">
<img src="images/ubb/left.gif" alt="字體左對(duì)齊" width="20" height="20" border="0"></a>
<a href="javascript:" onClick="addCenter()"> <img src="images/ubb/center.gif" alt="字體居中" width="20" height="20" border="0"></a>
<a href="javascript:" onClick="addRight()"> <img src="images/ubb/right.gif" alt="字體靠右" width="20" height="20" border="0"></a>
<img src="images/ubb/separator.gif" width="6" height="20"> <a href="javascript:" onClick="addimages()"><img src="images/ubb/image.gif" alt="引用外部圖片" width="20" height="20" border="0"></a><img src="images/ubb/separator.gif" width="6" height="20"> <a href="javascript:" onClick="addQuote()"><img src="images/ubb/quote.gif" alt="插入引用" width="20" height="20" border="0"></a>
<a href="javascript:" onClick="addURL()"><img src="images/ubb/link.gif" alt="加入超鏈接" width="20" height="20" border="0"></a>
<a href="javascript:" onClick="addEmail()"><img src="images/ubb/email.gif" alt="插入Email" width="20" height="20" border="0"></a></p>
<p>
<textarea name="content" cols="70" rows="15" wrap="VIRTUAL" class="form" id="content"></textarea>
</p>
<p>
<label>
<input type="submit" name="button" id="button" value="提交" />
</label>
<label>
<input type="reset" name="button2" id="button2" value="重置" />
</label>
</p>
</div> </td>
</tr>
</table>
</form>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -