<img src="small.jpg" onclick="src='big.jpg'">
解决方案 »
- jstl超连接传递中文参数乱码?
- 一个JS的程序
- XML 取值的问题 在线等
- 求简洁代码
- 请问js正则如何替换半角逗号?
- j如何修改avascript 编码
- 求助!! 如何在javascript 中使用trim函数 (在线等!!!)
- 如何将JSP中的数组作为参数,传递给javascript中的函数!
- 验证form的小问题
- 1000分悬赏,不相信没人能解决!!!分十次给!!
- 呵呵,生成了一些“颜色”,怎么排列这些颜色才好看?
- style="left: parseInt(220+(<bean:write name='index'/>)*50) px; top: 133px; width: 283px; height: 10px" >
<img id="photo" src="showImageServlet.photo?showMethod=directShow&colName=photo&ran=<%=dou%>" width="127" height="110" onclick="showOriginalPhoto('photo')" style="cursor:hand" title="显示照片原始尺寸">
<script>
showOriginalPhoto(obj)
{obj.width=1024;
obj.height=1024;
}
</script>直接修改文件的长/宽
如果上边的不行
该为:
obj.style.width=1024;
obj.style.height=1024;
<script>
function showOriginalPhoto(o)
{
var img = document.getElementById(o);
var src = img.src;
document.getElementById("showPhoto").innerHTML = "<img src='"+src+"'>";
}
</script>
<img id="photo" src="showImageServlet.photo?showMethod=directShow&colName=photo&ran=<%=dou%>" width="127" height="110" onclick="showOriginalPhoto('photo')" style="cursor:hand" title="显示照片原始尺寸">
就是要弹出一个新页专门来显示放大的图片!
<script>
function showOriginalPhoto(o)
{
var img = document.getElementById(o);
var src = img.src;
var newwin = window.open();
newwin.document.write("<img src='"+src+"'>");
}
</script>
<img id="photo" src="showImageServlet.photo?showMethod=directShow&colName=photo&ran=<%=dou%>" width="127" height="110" onclick="showOriginalPhoto('photo')" style="cursor:hand" title="显示照片原始尺寸">
<div style="position:absolute" id="showPhoto"></div>这句话什么意思?没看懂!
建立一个新的层啊并设置ID为showPhoto,然后用这个ID来操作
How about you?!
知道这些属性,用脚本,可以编写.