<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="gb2312" lang="gb2312">
<head>
<title> 上传的时候<input type="file">中用图片代替浏览按钮 </title>
<script language="javascript" type="text/javascript">
function fn_browse()
{
document.test_form.browse.click();
document.test_form.file.value = document.all.test_form.browse.value;
}
</script>
</head>
<body>
<form name="test_form" method="post" ENCTYPE="multipart/form-data" onsubmit="alert(document.test_form.browse.value);" />
<input type="file" name="browse" style="display:none;" />
<input type="text" name="file" />
<a href="javascript:fn_browse();">
<img name="btn" width=50 height=20 src="1.jpg" border="0" />
</a>
<br />
<br />
<input type="submit" name="提交表单" />
</form>
</body>
</html>