高分相送,如何时用javascript 对file field 控件赋值??
请教各位,如何用javascript 对file field 控件赋值??
我试过用以下方法,但不起作用,请问应该如何实现这一功能呢?
<script language="JavaScript" type="text/JavaScript">
function putfile(){
document.form1.picfile.value=="C:\PAD\aa.bmp";
document.form1.submit();
}
</script>
<form action="img.asp" method="post" enctype="multipart/form-data" name="form1">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#808080">
<tr bgcolor="#e4e4e4">
<td width="11%"><input type="button" name="Button" value="上传文件" onclick="gf();" ></td>
<td><input type="file" name="picfile" ></td>
</tr>
</table>
</form>