kooyee ‘s blog

          開源軟件, 眾人努力的結晶, 全人類的共同財富
          posts - 103, comments - 55, trackbacks - 0, articles - 66
             :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          日歷

          <2007年11月>
          28293031123
          45678910
          11121314151617
          18192021222324
          2526272829301
          2345678

          公告

          一起暢游計算機的世界

          搜索

          •  

          積分與排名

          • 積分 - 163348
          • 排名 - 363

          最新評論

          [WEB] 在線編輯器核心技術代碼

          Posted on 2007-11-30 18:22 kooyee 閱讀(281) 評論(0)  編輯  收藏 所屬分類: Web Design網頁設計
           1<iframe id=x name=x height="100" style="padding:0px;"></iframe><br>
           2<input type=button onclick=t('UnderLine') value="下劃線">
           3<input type=button onclick=t('bold') value="粗體">
           4
           5<input type=button onclick=t('JustifyLeft') value="左對齊">
           6<input type=button onclick=t('JustifyCenter') value="居中對齊">
           7<input type=button onclick=t('JustifyRight') value="右對齊">
           8
           9<input type=button onclick=t2() value="增高">
          10<input type=button onclick=t3() value="減少">
          11<script>
          12window.frames["x"].document.designMode="On"
          13//setTimeout('window.frames["x"].document.designMode="On"',200)
          14function t(s)
          15{
          16window.frames["x"].focus();
          17o=window.frames["x"].document.selection.createRange();
          18window.frames["x"].document.execCommand(s);
          19}

          20
          21function t2()
          22{
          23  var obj=window.frames["x"].frameElement;
          24  var height = parseInt(obj.offsetHeight);
          25  if (height+100>=100){
          26  obj.height=height+100;
          27  }

          28}

          29function t3()
          30{
          31  var obj=window.frames["x"].frameElement;
          32  var height = parseInt(obj.offsetHeight);
          33  if (height-100>=100){
          34  obj.height=height-100;
          35  }

          36}

          37</script>
          主站蜘蛛池模板: 广灵县| 城口县| 盐边县| 南昌县| 滨海县| 咸阳市| 博罗县| 塔城市| 长顺县| 包头市| 莆田市| 琼海市| 隆化县| 嵊泗县| 长葛市| 双牌县| 河池市| 左贡县| 镇康县| 塔城市| 康乐县| 马公市| 凤冈县| 巧家县| 应城市| 江门市| 宝山区| 石景山区| 营口市| 喀什市| 监利县| 顺义区| 独山县| 开化县| 正安县| 岢岚县| 淮阳县| 南投县| 衡阳市| 鄯善县| 赤壁市|