弹出文件选择框
<input type="text" id="text1" />
<input type="file" id="file1" style="display: none;" />
<input type="button" value="参照" onclick="file1.click();text1.value=file1.value;" />
这种方法会报“拒绝访问的错误”
改用下面的方法
.hiddenFile
{
position:absolute;filter:alpha(opacity=0);width:30px;" hidefocus
}
<INPUT type="file" name="uploadFile" size="50" maxlength="256" onchange="return upload();"/>
<ns:button property="btnAttachment" style="width:55px"><bean:message key="label.addto"/></ns:button> 基本实现预定效果