清空input type=file的value值的方法

function refreshUploader(who){
// pass who as argument,
// or who=document.getElementsByName('xx_file')[0];
var who2= who.cloneNode(false);
who2.onchange= who.onchange;// events are not cloned
who.parentNode.replaceChild(who2,who);
}

你可能感兴趣的:(input)