如下所示;var objFile = document.getElementById('fileID');objFile.outerHTML=objFile.outerHTML.replace(/(value=\").+\"/i,"$1\"");