webeditor是这样的,不然不是所有的都能撤消
解决方案 »
- 注册成功后,显示“注册成功,页面在3秒后跳转",但button的click执行完后就跟刷新似的没有前面说的效果
- 如何用JS判断时间问题
- 如何实现用javascript打印网页中指定的table中的内容,望高手赐教
- 求大神来帮个忙,找一下源码。
- java的简单问题.
- 求下面页面的三级联动JS代码,望各位帮帮忙,真的是急用~~
- 如何浮在网页两边的flash
- Htc:我的HTC在CSS中定义,HTC中又引用一个XML文件,现在有个关于路径引用的问题,帮忙啊! 阅读1次,滚动到底
- 为什么会弹出对话框?????
- top.topFrame.location.href('test.htm')这句在ie5里面不识别
- <a href="#top">
- 在线急等,用javascript写一个动态对
var history = new Object;
history.data = [];
history.position = 0;
history.book = [];// 保存历史
function saveHistory() {
if (bEditMode){
if (history.data[history.position] != eWebEditor.document.body.innerHTML){
var nBeginLen = history.data.length;
var nPopLen = history.data.length - history.position;
for (var i=1; i<nPopLen; i++){
history.data.pop();
history.book.pop();
} history.data[history.data.length] = eWebEditor.document.body.innerHTML; if (eWebEditor.document.selection.type != "Control"){
history.book[history.book.length] = eWebEditor.document.selection.createRange().getBook();
} else {
var oControl = eWebEditor.document.selection.createRange();
history.book[history.book.length] = oControl[0];
} if (nBeginLen!=0){
history.position++;
}
}
}
}// 初始历史
function initHistory() {
history.data.length = 0;
history.book.length = 0;
history.position = 0;
}// 返回历史
function goHistory(value) {
saveHistory();
// undo
if (value == -1){
if (history.position > 0){
eWebEditor.document.body.innerHTML = history.data[--history.position];
setHistoryCursor();
}
// redo
} else {
if (history.position < history.data.length -1){
eWebEditor.document.body.innerHTML = history.data[++history.position];
setHistoryCursor();
}
}
}