隱藏file空間,使用一個button按鈕的onclick事件代替 html
<form name=formen> <input type="file" name="picpath" id="picpath" style="display:none"
onChange="document.formen.path.value=this.value"> <input name="path" readonly>
<input type="button" value="Browse" onclick="document.formen.picpath.click()">
</form>