前台页面中用js取得eWebEditor的值

function return_ewebeditor_value()
{
  
//取得編輯器中的值
  var v=window.frames("eWebEditor1").window.frames("eWebEditor").document.getElementsByTagName("body")[0].innerHTML;
  
//下面取得去掉HTML標記的後的結果
  v=v.replace(/<[^>]*>/gi,'');
  
//下面取得去掉&nbsp;
  v=v.replace(/&nbsp(;)?/g,'');
  
//返回最後的結果
  return v;
}
此function僅適用於eWebEditor編輯器.
posted @ 2008-01-17 20:06  Athrun  阅读(532)  评论(0编辑  收藏  举报