标签:
由于样式需要不能直接用file,只能用文本框+按钮
<input type="file" id="filepath" style="display:none" onchange="changetext()" />
<input type="text" id="txtpath" class="m-wrap" value="" />
<input class="btn green" type="button" value="选择文件" id="uploadpath" />
jQuery(document).ready(function () {
$("uploadpath").click("click", function () {
$("#filepath").trigger("click");
});
})
function changetext()
{
$("#txtpath").val($("#filepath").val());
}
标签:
原文地址:http://www.cnblogs.com/jianghaidong/p/5583204.html