代码如下,我想将file标签浏览的地址放到img下的src上,IE可以显示图片,但火狐不能这是怎么回事?急!!!
在线等
</script> <script type="text/javascript">
$("#supPhoto").change(function(){
// alert($("#supPhoto").val());
document.getElementById("bigImage").src =$("#supPhoto").val(); }) ;
</script></head>
<body>
<div id=imgContainer class=imgContainer><img id=bigImage src="${photoPath}" /> </div>
<tr>
<td height="40">
<s:file name="supPhoto" id="supPhoto" class="gensched-37" ></s:file> <input type="hidden" name="proId" value="${proId}">
<input type="hidden" name="proPath" value="${proPath}"> </td>
<td> </td>
</tr>
</body>
</html>
在线等
</script> <script type="text/javascript">
$("#supPhoto").change(function(){
// alert($("#supPhoto").val());
document.getElementById("bigImage").src =$("#supPhoto").val(); }) ;
</script></head>
<body>
<div id=imgContainer class=imgContainer><img id=bigImage src="${photoPath}" /> </div>
<tr>
<td height="40">
<s:file name="supPhoto" id="supPhoto" class="gensched-37" ></s:file> <input type="hidden" name="proId" value="${proId}">
<input type="hidden" name="proPath" value="${proPath}"> </td>
<td> </td>
</tr>
</body>
</html>
解决方案 »
- Hibernate 多对多关系映射
- Struts出错
- 用JavaMail,qq邮箱发邮件遇到问题了,实在解决不了,向各位请教!!!
- select optiion 联动
- 关于struts 应用迁移路径的问题??
- 急!在线等!!!ORA-00933: SQL 命令未正确结束 java.sql.SQLException: ORA-00933: SQL 命令未正确结束
- 您好,您以前回答过的我问题,现在我又来找您了!
- Structs中的事务如何处理?救急!!!
- easyui怎么用json和后台交互啊?
- jsp中getProperty问题,我为什么一用就出错呀!
- tomcat 集群问题(高手进,在线等)
- java 读写visio
你把方法改成js的
funciton changeImg(){
document.getElementById("bigImage").src =$("#supPhoto").val();
}
然后在
<s:file onchange="changeImg()" name="supPhoto" id="supPhoto" class="gensched-37" ></s:file>