<input type="button" value="selectAll" onclick="selectAll();"></body><script type="text/javascript">
function copy(){ document.execCommand("copy",false,null);
} function selectAll(){ document.execCommand("selectAll",false,null);
} function open(){ document.execCommand("open",false,null);
} function saveAs(){ document.execCommand("saveAs",false,null);
} function print(){ document.execCommand("print",false,null);
}</script>上面代碼是我直接復(fù)制過(guò)來(lái)的,在別人博客上就是可以運(yùn)行的,比如全選就可以??墒菑?fù)制到我本地電腦html文件上,啥也不行,所有的命令一個(gè)都不行.....也上傳到服務(wù)器過(guò),還是不行...這是人品問(wèn)題嗎
JS document.execCommand 富文本 命令自己寫(xiě)的完全不行,請(qǐng)問(wèn)這是什么情況?。?/h1>
哈士奇WWW
2018-08-10 10:09:43
哈士奇WWW
2018-08-10 10:09:43