小弟求助啊 ,怎样才能把红色的那个文本框里的路径的图片显示在蓝色的div里啊?
<style type="text/css">#main{display:none; width:300px; height:400px; background:#FFFFFF;}
</style>
<script language="javascript">
function chuan(a)
{
document.getElementById('user').value=a;
}
</script>
</head>
<body>
<div id="main" onclick="javscript:document.getElementById('main').style.display='none'">
<table width="350" border="1" align="center" bordercolor="#ECEC00">
<tr>
<td align="center">1</td>
<td align="center"><img src="a1.png" width="82" height="90" onclick="chuan(this.src)" /></td>
<td align="center">2</td>
<td align="center"><img src="a2.png" width="82" height="90" onclick="chuan(this.src)" /></td>
<td align="center">3</td>
<td align="center"><img src="a3.png" width="82" height="90" onclick="chuan(this.src)" /></td>
</tr>
</table>
</div>
<form id="form2" name="form2" method="post" action="">
<table>
<tr>
<td>用户头像:<input name="user" id="user" type="text" />
<input type="button" value="浏览..." onclick="javascript:document.getElementById('main').style.display='block'" />
</td>
</tr>
</table>
</form>
<div id="imgs">
</div>
</body>
</html>