📄 addnews.js
字号:
}
}
function CheckTitle(){
var str=document.form.title
for (u=0;u<str.length;u++){
if (str.indexOf("测试")==-1) {
break;
}
}
if (u!=str.length)
{
alert('标题不能包含有 " ')
}
}
function resetText(){
if (window.confirm('您确定要还原?')){
frames.message.document.body.innerHTML = '';
return true;
}
return false;
}
function isclick()
{
var click = document.form.click;
if ( isNaN( click.value ))
{
alert ("“新闻点击量”只能输入数字!!");
click.focus();
document.form.click.value ="0";
return false;
}
}
function DoTitle(addTitle){
var currentTitle = document.form.title.value;
revisedTitle = addTitle+currentTitle;
document.form.title.value=revisedTitle;
return;
}
function DoHotNews(HotNewsCode){
revisedTitle = HotNewsCode;
document.form.HotNewsCode.value=revisedTitle;
return;
}
function DoRecommendNews(RecommendNewsCode){
revisedTitle = RecommendNewsCode;
document.form.RecommendNewsCode.value=revisedTitle;
return;
}
function DoLastNews(LastNewsCode){
revisedTitle = LastNewsCode;
document.form.LastNewsCode.value=revisedTitle;
return;
}
function DoBigClass(BigClassCode){
revisedTitle = BigClassCode;
document.form.BigClassCode.value=revisedTitle;
return;
}
function DoSmallClass(SmallClassCode){
revisedTitle = SmallClassCode;
document.form.SmallClassCode.value=revisedTitle;
return;
}
function DoJSCode(JSCode){
revisedTitle = JSCode;
document.form.JSCode.value=revisedTitle;
return;
}
function DoVoteCode(VoteCode){
revisedTitle = VoteCode;
document.form.VoteCode.value=revisedTitle;
return;
}
function setMode(newMode)
{
bTextMode = newMode;
var cont;
if (bTextMode) {
cleanHtml();
//cleanHtml();
cont=message.document.body.innerHTML;
message.document.body.innerText=cont;
}
else {
cont=message.document.body.innerText;
message.document.body.innerHTML=cont;
}
message.focus();
}
function SetNewsTemplet(newMode)
{
bTextMode = newMode;
var cont
if (bTextMode) {
cont=form.TempletContent.value
form.viewNewshtml.checked=false
Content.document.body.innerHTML=cont
}
else {
cont=form.TempletContent.value
Content.document.body.innerHTML=cont
}
}
function cleanHtml()
{
var fonts = message.document.body.all.tags("FONT");
var curr;
for (var i = fonts.length - 1; i >= 0; i--) {
curr = fonts[i];
if (curr.style.backgroundColor == "#ffffff") curr.outerHTML = curr.innerHTML;
}
}
function FormatText(command, option){
frames.message.document.execCommand(command, true, option);
frames.message.focus();
}
function CrTable()
{
var arr = showModalDialog("include/table.html", "", "dialogWidth:13.5em; dialogHeight:10.5em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
row=ss[0];
col=ss[1];
var string;
string="<table cellspacing=1 width=100% cellpadding=0 bgcolor=#000000>";
for(i=1;i<=row;i++){
string=string+"<tr bgcolor=#FFFFFF>";
for(j=1;j<=col;j++){
string=string+"<td></td>";
}
string=string+"</tr>";
}
string=string+"</table>";
content=message.document.body.innerHTML;
content=content+string;
message.document.body.innerHTML=content;
}
else message.focus();
}
function swf()
{
var arr = showModalDialog("include/flash.asp", "", "dialogWidth:15em; dialogHeight:15em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
path=ss[0];
row=ss[1];
col=ss[2];
var string;
string="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width="+row+" height="+col+"><param name=movie value="+path+"><param name=quality value=high><embed src="+path+" pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width="+row+" height="+col+"></embed></object>"
content=message.document.body.innerHTML;
content=content+string;
message.document.body.innerHTML=content;
}
else message.focus();
}
function wmv()
{
var arr = showModalDialog("include/media.asp", "", "dialogWidth:16.5em; dialogHeight:15em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
path=ss[0];
row=ss[1];
col=ss[2];
var string;
string="<object classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' width="+row+" height="+col+"><param name=Filename value="+path+"><param name='BufferingTime' value='5'><param name='AutoSize' value='-1'><param name='AnimationAtStart' value='-1'><param name='AllowChangeDisplaySize' value='-1'><param name='ShowPositionControls' value='0'><param name='TransparentAtStart' value='1'><param name='ShowStatusBar' value='1'></object>"
content=message.document.body.innerHTML;
content=content+string;
message.document.body.innerHTML=content;
}
else message.focus();
}
function rm()
{
var arr = showModalDialog("include/rm.asp", "", "dialogWidth:16.5em; dialogHeight:15em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
path=ss[0];
row=ss[1];
col=ss[2];
var string;
string="<object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' width="+row+" height="+col+"><param name='CONTROLS' value='ImageWindow'><param name='CONSOLE' value='Clip1'><param name='AUTOSTART' value='-1'><param name=src value="+path+"></object><br><object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' width="+row+" height=60><param name='CONTROLS' value='ControlPanel,StatusBar'><param name='CONSOLE' value='Clip1'></object>"
content=message.document.body.innerHTML;
content=content+string;
message.document.body.innerHTML=content;
}
else message.focus();
}
function pic()
{
var arr = showModalDialog("include/pic.asp", "", "dialogWidth:16.5em; dialogHeight:13.5em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
c=ss[2];
d=ss[3];
//e=ss[4];
var str1;
str1="<img src='"+a+"' alt='"+b+"'"
str1=str1+" style='"+c+"'"
//str1=str1+" width='"+d+"' height='"+e+"'"
str1=str1+""+d+""
str1=str1+">"
content=message.document.body.innerHTML;
content=content+str1;
message.document.body.innerHTML=content;
}
else message.focus();
}
function FIELDSET()
{
var arr = showModalDialog("include/fieldset.htm", "", "dialogWidth:16.5em; dialogHeight:9.5em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
c=ss[2];
d=ss[3];
var str1;
str1="<FIELDSET "
str1=str1+"align="+a+""
str1=str1+" style='"
if(c.value!='')str1=str1+"color:"+c+";"
if(d.value!='')str1=str1+"background-color:"+d+";"
str1=str1+"'><Legend"
str1=str1+" align="+b+""
str1=str1+">标题</Legend>内容</FIELDSET>"
content=message.document.body.innerHTML;
content=content+str1;
message.document.body.innerHTML=content;
}
else message.focus();
}
function iframe()
{
var arr = showModalDialog("include/iframe.htm", "", "dialogWidth:20em; dialogHeight:13.5em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
c=ss[2];
d=ss[3];
e=ss[4];
var str1;
str1="<iframe src='"+a+"'"
str1+=" scrolling="+b+""
str1+=" frameborder="+c+""
if(d!='')str1+=" marginheight="+d
if(e!='')str1+=" marginwidth="+e
str1=str1+"></iframe>"
content=message.document.body.innerHTML;
content=content+str1;
message.document.body.innerHTML=content;
}
else message.focus();
}
function hr()
{
var arr = showModalDialog("include/hr.htm", "", "dialogWidth:20em; dialogHeight:13.5em; status:0;help:0");
if (arr != null){
var ss;
ss=arr.split("*")
a=ss[0];
b=ss[1];
c=ss[2];
d=ss[3];
e=ss[4];
var str1;
str1="<hr"
str1=str1+" color='"+a+"'"
str1=str1+" size="+b+"'"
str1=str1+" "+c+""
str1=str1+" align="+d+""
str1=str1+" width="+e
str1=str1+">"
content=message.document.body.innerHTML;
content=content+str1;
message.document.body.innerHTML=content;
}
else message.focus();
}
function setid()
{
str='<br>';
if(!window.form1.upcount.value)
window.form1.upcount.value=1;
for(i=1;i<=window.form1.upcount.value;i++)
str+='文件'+i+':<input type="file" name="file'+i+'"><br>';
window.upid.innerHTML=str+'';
}
function Addpic(imagePath)
{
onblur=this.focus
window.opener.frames.message.document.execCommand('InsertImage', false, imagePath);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -