关于input中file组件的value值无法更改的解决办法

<tr>
	      <td width="30%" class="importform_left">请选择报告附件:</td>
	      <td width="70%"><input type="file" id="reportAttachment" name="reportAttachment" style= "height:20px;background-color:;border-color:#ebebeb;border:#cdcdcd 1px solid"/></td>
	    </tr>



把这个input干掉,然后重新生成,这就叫凤凰涅磐,呵呵.

<img src="/images/res_sharing/button_reset.jpg" align="absmiddle"  onclick="javascript:document.getElementById('reportAttachment').outerHTML='<input type=\'file\' id=\'reportAttachment\' name=\'reportAttachment\' style= \'height:20px;background-color:;border-color:#ebebeb;border:#cdcdcd 1px solid\'>';"/>

猜你喜欢

转载自java-frog.iteye.com/blog/708165