会员登陆

网站编辑文章自动排版工具代码

发表时间:2017/03/31 00:00:00  浏览次数:202  
字体大小: 【小】 【中】 【大】
网站编辑文章自动排版工具代码  ^_^  功能演示

<DIV class=Article>
<DIV class=Article_head> </DIV>
<DIV id=changeBodyFont class=Article_body>
<DIV align=center>
<CENTER>
<TABLE style="BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 borderColor=#111111 cellPadding=0 width=760 bgColor=#ffffff height=532>
<SCRIPT language=JavaScript type=text/JavaScript>  
function quickreply(){  
if(formreply.body.value=='')  
{  
        alert('请输入排版内容!');  
  formreply.body.focus();  
  return false;  
  }else{  
        return true;  
  }  
}  
function format()  
{  
        var body = "\n"+document.getElementById("thebody").value;  
                body = body.replace(/ | /ig,"");  
        body = body.replace(/\n/ig,"  ");  
        body = body.replace("\n\n","");  
        document.getElementById("thebody").value=body;  
}  
  
</SCRIPT>

<SCRIPT language=JavaScript type=text/JavaScript>  
function quickreply(){  
if(formreply.body.value=='')  
{  
        alert('请输入回复内容!');  
  formreply.body.focus();  
  return false;  
  }else{  
        return true;  
  }  
}  
function format2()  
{  
        var body = "\n"+document.getElementById("thebody").value;  
        body = body.replace(/ | /ig,"");  
        body = body.replace(/\r\n/ig,"\n");  
        body = body.replace(/\n\n/ig,"\n");  
        body = body.replace(/\n\n/ig,"\n");  
        body = body.replace(/\n\n/ig,"\n");  
        body = body.replace(/\n\n/ig,"\n");  
        body = body.replace(/\n/ig,"  \n");  
        body = body.replace("\n\n","\n");  
        document.getElementById("thebody").value=body;  
}  
function format3()  
{  
        var body = "\n"+document.getElementById("thebody").value;  
        body = body.replace(/ | /ig,"");  
        body = body.replace(/\r\n/ig,"\n");  
        body = body.replace(/\n\n/ig,"\n");  
        body = body.replace(/\n\n/ig,"\n");  
        body = body.replace(/\n\n/ig,"\n");  
        body = body.replace(/\n\n/ig,"\n");  
        body = body.replace(/\n/ig,"\n\n");  
        body = body.replace("\n\n","");  
        document.getElementById("thebody").value=body;  
}  
function format4()  
{  
        var body = document.getElementById("thebody").value;  
        for (var ii=0; 100>ii;ii++)  
{  
  body = body.replace(" ","");  //去除全角空格  
  body = body.replace(",",",");  //替换英文标点  
  body = body.replace("......","……");  
  body = body.replace("。。。。。。","……");  
  body = body.replace("?","?");  
  body = body.replace(".","。");    
  body = body.replace(";",";");    
  body = body.replace(":",":");  
  body = body.replace("!","!");  
  body = body.replace("(","(");  
  body = body.replace(")",")");  
  body = body.replace("----","——");  
  body = body.replace("--","——");  
  body = body.replace("[","[");  
  body = body.replace("]","]");  
  }  
        document.getElementById("thebody").value=body;  
}  
</SCRIPT>

<SCRIPT language=JavaScript>  
function copy(ob){  
var obj=findObj(ob); if (obj) {  
obj.select();js=obj.createTextRange();js.execCommand("Copy");}  
}  
function paste(ob) {  
    var obj=findObj(ob); if (obj) {  
    obj.select();js=obj.createTextRange();js.execCommand("Paste");}  
}  
function findObj(n, d) {  
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {  
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];  
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers.document);  
if(!x && document.getElementById) x=document.getElementById(n); return x;  
}  
</SCRIPT>
</SCRIPT>
<SCRIPT language=javascript>  
function chklen() {  
  var strlen;  
  strlen= KKsForm.Content.value.length;  
  alert("目前长度" + strlen + "文字\n");  
  return;  
  }  
  //打开窗口  
  
  </SCRIPT>
<FORM method=post name=KKsForm action=addarticle.asp?action=save>
<TBODY>
<TR>
<TD bgColor=#f3f3f3 height=133 width="85%">
<CENTER>
<TABLE id=table1 border=0 width="100%">
<TBODY>
<TR>
<TD>
<P align=center><B><FONT color=#ff0000 size=4>魅网时尚在线排版工具<BR><A href="http://www.MWDSS.COM">nrj.lt126.COM</A></FONT></B></P></TD></TR></TBODY></TABLE></CENTER>
<CENTER>
<TABLE style="BORDER-COLLAPSE: collapse" id=AutoNumber1 border=0 cellSpacing=0 borderColor=#111111 cellPadding=0 width="98%" height=1>
<TBODY>
<TR>
<TD height=1 width="100%">
<P style="LINE-HEIGHT: 150%" align=left><BR>本排版系统主要为解决<FONT color=#ff0000 size=2>魅网时尚</FONT>投稿排版问题<BR>1、<FONT color=#494949><INPUT class=button title=统计输入汉字数 onclick=chklen() value=统计字数 type=button name=len1></FONT> 计算文本框里的稿件字数。<BR>2、<FONT color=#494949><INPUT class=button title=仅用于删除文章内多余空行及空格 onclick=javascript:format2() value=消除空行 type=button name=body2></FONT> 删除文章中多余空行。<BR>3、<FONT color=#494949><INPUT class=button title=系统自动排版 onclick=javascript:format() value=自动排版 type=button name=body3></FONT> 让每个自然段落前空出两格。<BR>4、从WORD复制过来的稿子,在本系统会看到首行空格没有了,直接点<FONT color=#494949><INPUT class=button title=系统自动排版 onclick=javascript:format() value=自动排版 type=button name=body5></FONT> 。<BR>5、如果对稿件有错误操作,可将鼠标定位在投稿文本框里,按Ctrl+Z逐步恢复。<BR>6、排好后直接点“复制文章”,再直接粘贴到网站投稿区即可。<BR></P></TD></TR></TBODY></TABLE></CENTER></TD></TR>
<TR>
<TD bgColor=#fafafa height=53 width="85%">
<P align=center><INPUT value=粘贴文章 type=button name=Button> <INPUT class=button title=系统自动排版 onclick=javascript:format() value=自动排版 type=button name=body> <INPUT class=button title=仅用于删除文章内多余空行及空格 onclick=javascript:format2() value=消除空行 type=button name=body1> <FONT color=#008000><INPUT class=button title=自动段间空行自动排版 onclick=javascript:format3() value=添加空行 type=button name=body3> </FONT><INPUT class=button title=统计输入汉字数 onclick=chklen() value=统计字数 type=button name=len <input> <INPUT value=复制文章 type=button name=cmdok> <INPUT value=清空内容 type=reset name=cmdReset></P></TD></TR>
<TR>
<TD bgColor=#fafafa height=262 width="85%">
<P align=center><TEXTAREA id=thebody rows=22 cols=100 name=Content>哥抽的不是烟,是灵感。。。</TEXTAREA> </P></TD></TR>
<TR>
<TD bgColor=#f3f3f3 height=86 width="85%">
<DIV align=center> </DIV></TD></TR>
<TR>
<TD></TD>
<TR>
<TD bgColor=#e3e3e3 height=31 width="85%">
<P align=center><B><FONT color=#ff0000 size=4>欢迎访问<A href="http://www.MWDSS.COM">nrj.lt126..COM</A><B><FONT color=#ff0000 size=4>魅网时尚</FONT></B></FONT></B></P></TD></TR>
<TR>
<TD bgColor=#f3f3f3 height=1 width="85%"></TD></TR></FORM></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<STYLE type=text/css>  
<!--  
A:link{text-decoration:none}  
A:visited{text-decoration:none}  
A:hover {color: #ff00ff;text-decoration:underline}  
-->  
</STYLE>
</DIV></DIV>
<DIV class=UpDown> </DIV></DIV>
文章评论
发表评论:(匿名发表无需登录,已登录用户可直接发表。) 登录状态: 未登录,点击登录

本站部分网文来自网络,如有涉及您的利益,本站表示歉意,请及时告知准时更正。

版权所有  蓝天网

本站全体管理员热忱欢迎您的加入      蓝天网QQ群:83443441

Free Web Counter