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

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


          網站導航:
           
          主站蜘蛛池模板: 汾阳市| 威远县| 游戏| 平山县| 定结县| 锡林浩特市| 广灵县| 龙门县| 霍林郭勒市| 定西市| 泰和县| 夹江县| 红河县| 会理县| 萝北县| 通河县| 和龙市| 德格县| 东乌珠穆沁旗| 南投市| 孝感市| 京山县| 探索| 轮台县| 江安县| 托克逊县| 崇州市| 岳池县| 抚宁县| 龙里县| 呼和浩特市| 清河县| 柞水县| 长泰县| 固始县| 扶沟县| 四会市| 南部县| 五指山市| 日喀则市| 张掖市|