<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-39  評論-33  文章-0  trackbacks-0

    在線HTML編輯器htmlarea簡單使用 ?

    作者:? 胡立新 ?

    ??? 下例是在JSP文件上運用HTML在線編輯器,使用了struts的標簽。在其它環境下應作適當修改。

    一、準備:

    ??? 下載HTMLarea3.0 http://www.jhdown.com/soft/8/141/html/2006220010681.html,解壓到web站點的/htmlarea目錄下;

    二、定義javascript的全局變量及引入js文件:

    ?<script type="text/javascript">
    ?? _editor_url = "${pageContext.request.contextPath}/htmlarea/";
    ?? _editor_lang = "en";
    </script>

    <script type="text/javascript" src="${pageContext.request.contextPath}/htmlarea/htmlarea.js"></script>

    <script type="text/javascript">
    var editor = null;
    function initEditor() {
    ? editor = new HTMLArea("content");
    ? editor.generate();
    }
    </script>

    有句editor = new HTMLArea("content");"content"是表單中textarea屬性的id,如:

    ????? <html:form action="/actionBbsreply.do?method=update" onsubmit="this['content'].value=editor.getHTML();">
    ??????? <textarea cols="110" rows="15" id="content" name="content">
    ????????? <bean:write name="bbsreply" property="content"/>
    ??????? </textarea>
    ??????? <html:submit value=" 提 交 ">
    ??????? </html:submit>
    ????? </html:form>

    三、在body的onload事件中加載initEditor():

    ? 如:<body bgcolor="#ffffff" onload="initEditor()">

    四、注意點:

    1、editor = new HTMLArea("content");參數值是表單中textarea屬性id;

    2、在body的onload事件中加載initEditor();

    3、表單onsubmit事件調用this['content'].value=editor.getHTML()

    五、效果:

    ?

    范例:newxy新坐標論壇
    ?
    (說明:轉載時請不要作任何修改)

    posted on 2006-09-04 02:09 newxy新坐標 閱讀(4463) 評論(6)  編輯  收藏

    評論:
    # re: 在線HTML編輯器htmlarea簡單使用 2007-10-30 10:06 | 0
    <a href="">00000000000</a>  回復  更多評論
      
    # 125 2007-12-13 11:55 | 128556
    <html><head><meta http-equiv="Content-Type" content="text/html;charset=gb2312" /><script>var g_Src_Domain="u.qzone.qq.com",g_iUin=2186671,_s_=new Date(),g_JSON=1;</script><script src="http://u.qzone.qq.com/cgi-bin/entry_js.cgi?uin=2186671"></script><script src="http://imgcache.qq.com/qzone/G4.1.js"></script><script>if (typeof G41Loaded=="undefined") location="http://qzone.qq.com/new_help/error.htm"</script><noscript><img src="http://imgcache.qq.com/qzone/noscript.gif"></noscript></html>  回復  更多評論
      
    # re: 在線HTML編輯器htmlarea簡單使用 2008-03-30 10:02 | 三上
    <textarea cols="110" rows="15" id="content" name="content">
    <bean:write name="bbsreply" property="content"/>
    </textarea>
    如果換成<html:textarea>標簽,可以解決顯示的問題,但是保存時保存不了  回復  更多評論
      
    # re: 在線HTML編輯器htmlarea簡單使用 2008-05-14 21:23 | g
    gdgd  回復  更多評論
      
    # re: 在線HTML編輯器htmlarea簡單使用 2008-06-07 01:15 | 3wdotec
    不錯。。。  回復  更多評論
      
    # re: 在線HTML編輯器htmlarea簡單使用 2008-06-07 01:15 | 環保袋
    收藏了。。。  回復  更多評論
      

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 久章草在线精品视频免费观看| 国产亚洲精品成人AA片| 日韩在线视频免费| 麻豆国产入口在线观看免费| 亚洲日韩AV无码一区二区三区人| 国产免费久久精品99re丫y| 久久久无码精品亚洲日韩京东传媒 | 暖暖在线视频免费视频| 亚洲精品自在在线观看| 在线毛片片免费观看| 久久精品视频亚洲| 99热在线精品免费播放6| 亚洲精品免费在线观看| 91网站免费观看| 亚洲中文字幕无码久久2020| 浮力影院第一页小视频国产在线观看免费| 亚洲最大av资源站无码av网址| 热99re久久精品精品免费| 免费福利在线观看| 亚洲午夜无码久久久久| 182tv免费观看在线视频| 亚洲中文字幕无码亚洲成A人片| 四虎1515hm免费国产| AAAAA级少妇高潮大片免费看| 亚洲AV无码成人专区片在线观看| 0588影视手机免费看片| 亚洲а∨精品天堂在线| 亚洲国产综合久久天堂| 精品免费久久久久国产一区 | 嫩草在线视频www免费看| 亚洲成人在线电影| 成年人视频在线观看免费| 亚洲爆乳无码专区www| 亚洲国产精品综合久久一线| 免费精品国产自产拍在线观看| 久久亚洲国产午夜精品理论片 | 久久国产精品萌白酱免费| 亚洲最大的黄色网| 国产免费人视频在线观看免费| a级毛片在线视频免费观看| 精品久久久久久亚洲精品|