利用正则表达式而已,IE6可用,高版本不一定可用
1
var
obj
=
<
input type
=
"
file
"
/
>
2 obj.outerHTML = obj.outerHTML.replace( / (value=\").+\" / i, " $1\ "" );
2 obj.outerHTML = obj.outerHTML.replace( / (value=\").+\" / i, " $1\ "" );