var obj = document.getElementByIdx(' file 的id') obj.outerHTML=obj.outerHTML或者obj.select()document.selection.cl