本帖最后由 cooca 于 2010-3-19 14:33 编辑
回复 2# lidq.jingwu
我也是这么想的 可就是没找到对应的JS
以下是FontSize.html的代码:- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <HEAD>
- <TITLE>Font Size</TITLE>
- <META NAME="Generator" CONTENT="EditPlus">
- <META NAME="Author" CONTENT="">
- <META NAME="Keywords" CONTENT="">
- <META NAME="Description" CONTENT="">
- <meta http-equiv="content-type" content="text/html; charset=gb2312">
- <style type="text/css">
- body{
- overflow:hidden;
- margin:0px;
- padding:0px;
- padding-top:1px;
- background:url("bgcolor.gif")
- }
- .Aout{
- color:#555;
- width:98%;
- font-size:14px;
- border:1px solid #fff;
- padding: 2px;
- }
- .Aover{
- color:#000;
- border:1px solid #999;
- background:#eee;
- font-size:14px;
- width:98%;
- padding: 2px;
- }
- </style>
- <script type="text/javascript">
- function setCmd(_sSort, _sFont){
- if(window.Event){
- var oRTE = opener.getFrameNode(opener.sRTE);
- }else {
- var oRTE = dialogArguments.getFrameNode(dialogArguments.sRTE);
- }
- oRTE.focus();
- oRTE.document.execCommand(_sSort, false, _sFont);
- oRTE.focus();
- }
- function _over(o) {
- o.className="Aover";
- }
- function _out(o) {
- o.className="Aout";
- }
- </script>
- </HEAD>
- <BODY>
- <center>
- <div class="Aout" onmouseover="_over(this)" onmouseout="_out(this)" onclick="setCmd('FontSize', '1')">10 px</div>
- <div class="Aout" onmouseover="_over(this)" onmouseout="_out(this)" onclick="setCmd('FontSize', '2')">14 px</div>
- <div class="Aout" onmouseover="_over(this)" onmouseout="_out(this)" onclick="setCmd('FontSize', '3')">16 px</div>
- <div class="Aout" onmouseover="_over(this)" onmouseout="_out(this)" onclick="setCmd('FontSize', '4')">18 px</div>
- <div class="Aout" onmouseover="_over(this)" onmouseout="_out(this)" onclick="setCmd('FontSize', '5')">24 px</div>
- <div class="Aout" onmouseover="_over(this)" onmouseout="_out(this)" onclick="setCmd('FontSize', '6')">32 px</div>
- <div class="Aout" onmouseover="_over(this)" onmouseout="_out(this)" onclick="setCmd('FontSize', '7')">48 px</div>
- </center>
- </BODY>
- </HTML>
复制代码 有没有知道的呀 |