file控件样式

<html>
<body>
<form method="post" name="f1">
<input type="text" name="predent" id="puf" />

<input type="button" value="浏览..." onclick="mc()" />
<input type="file" name="uf" id="uploadfile" style="display:none" onchange="mm()" />
</form>
<body>
</html>
<script>
$=function(id){return document.getElementById(id);}
function mc(){var _i=$("uploadfile");_i.click();}
function mm(){$("puf").value=(document.f1.uf.value);}
window.onload=function(){
}
</script>

posted on 2014-11-01 17:02  ChrisPaul  阅读(177)  评论(0编辑  收藏  举报