posts - 32,  comments - 3,  trackbacks - 0
          //首先在HEAD區(qū)加入要引用的JS
          <head>
          <script type="text/javascript" src="FCKEditor/fckeditor.js"></script> 
          <script type="text/javascript" language="javascript">
          function check()
          {
             // 取得FCKEditor的值,GetInstance(arg),這里的參數(shù)arg是FCKeditor實(shí)例名;
             //如聲明FCKeditor用var oFCKeditor = new FCKeditor('FCKEditor1',500,200,'Board'),則此時arg就是FCKEditor1;
                  var checkContent1 =FCKeditorAPI.GetInstance("FCKEditor1").GetXHTML();
                  if (checkContent1 == "")
                  {
                     strErr += '評論內(nèi)容不能為空!\n\n';
              alert(strErr);
                  }
          }
          </script>
          </head>
          <%-- 把這段寫在需要顯示FCKEditor編輯框的地方 --%>
          <div class="FCKeditor">
          <script type="text/javascript">
              var sBasePath = "FCKEditor/";
              var oFCKeditor = new FCKeditor('FCKEditor1',500,200,'Board'); //實(shí)例名為FCKEditor1
              oFCKeditor.BasePath = sBasePath ;
              oFCKeditor.Create() ;
          </script>
          </div>
          <%-- 用于提交內(nèi)容的按鈕,響應(yīng)點(diǎn)擊事件為 check() --%>
          <input id="Button1" value="button" type="button" onclick="check()" />
          轉(zhuǎn)自:http://hi.baidu.com/myaspdotnet/blog/item/0b73cd3f0ab9f3c77c1e714a.html
          posted on 2011-05-27 22:21 donghang73 閱讀(235) 評論(0)  編輯  收藏

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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 屏南县| 内黄县| 神农架林区| 黄梅县| 曲水县| 江油市| 山东| 侯马市| 岳阳市| 万荣县| 满洲里市| 东兰县| 林周县| 富民县| 定州市| 嘉兴市| 白山市| 凌源市| 舟山市| 晋中市| 喀什市| 左贡县| 株洲市| 安庆市| 昌吉市| 渑池县| 太原市| 美姑县| 双辽市| 沅陵县| 耿马| 青冈县| 潼南县| 琼中| 监利县| 吐鲁番市| 霍邱县| 横峰县| 永平县| 基隆市| 沽源县|