读书人

弹出资料选择框

发布时间: 2012-10-14 14:55:08 作者: rapoo

弹出文件选择框
<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> 基本实现预定效果

读书人网 >Web前端

热点推荐