以下是 jquery word格式排版整理js特效代码 的示例演示效果:
部分效果截图:
HTML代码(index.html):
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>jquery word��ʽ�Ű��������</title>
<script src="js/jquery-1.9.1.min.js"></script>
<SCRIPT LANGUAGE="JavaScript">
String.prototype.Trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.LTrim = function()
{
return this.replace(/(^\s*)/g, "");
}
String.prototype.RTrim = function()
{
return this.replace(/(\s*$)/g, "");
}
$(function(){
$(".pb").click(function(){
/*ss =$(".12").text();
ss =ss.Trim()
$(".12").text(ss)*/
$("p").each(function(index){
var ss =$("p:eq("+index+")").text();
$("p:eq("+index+")").text(ss.Trim())
$("p:eq("+index+")").css("text-indent","2em");
})
})
})
</SCRIPT>
</head>
<body>
<div class="pb" style=" background:#333; padding:10px; color:#FFF; cursor:pointer;" > ����Ű�word �����������ݣ�1��ȥ��ԭ�����ÿո�2���ճ������ַ�,������վ������̨�༭����</div>
<p class="12"> �л��������̷� </p>
<p>
<br />
</p>
<p onclick="trim()"> ����Ժ��վ
</p>
<p>
<br />
</p>
<p>
2013.08.22
</p>
<p>
<br />
</p>
<p>
���䲼��λ��ȫ����������᳣��ίԱ�� ���䲼ʱ�䡿 1992.11.07
</p>
<p>
���� ����Чʱ�䡿 1993.07.01 ��ʱЧ�ԡ���Ч
</p>
<p>
<br />
</p>
<p>
<br />
</p>
<p>
�л�������ϯ��(�߽��64��)
</p>
<p>
<br />
</p>
<p onclick="trim()">
���� ���л��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7�ջ��������̷��������л��������߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ�����1992��11��7��ͨ�������蹫������1993��7��1����ʩ�С�
</p>
<p>
�����л�������ϯ������
</p>
<p>
����1992��11��7��
</p>
<p>
<br />
</p>
<p>
�л��������̷�
</p>
<p>
����(һ�žŶ���ʮһ�����յ��߽�ȫ����������᳣��ίԱ��ڶ�ʮ�˴λ���ͨ��)
</p>
<p>
<br />
</p>
<p>
<br />
</p>
<p>
����Ŀ¼
</p>
<p>
������һ������
</p>
<p>
�����ڶ��´���
</p>
<p>
������һ�ڴ�������Ȩ
</p>
<p>
�����ڶ��ڴ�����ѺȨ
</p>
<p>
���������ڴ�������Ȩ
</p>
<p>
���������´�Ա
</p>
<p>
������һ��һ��涨
</p>
<p>
�����ڶ��ڴ���
</p>
<p>
���������º��ϻ��������ͬ
</p>
<p>
������һ��һ��涨
</p>
<p>
�����ڶ��ڳ����˵�����
</p>
<p>
���������������˵�����
</p>
<p>
�������Ľ����䵥֤
</p>
<p>
��������ڻ��サ��
</p>
<p>
<br />
</p>
</body>
</html>