<img src="xxx.jpg" id=1>
<script>
alert(document.images(1).width)
alert(document.images("1").src)
if(document.images("1").width<300) document.images("1").width=400
</script>
<script>
alert(document.images(1).width)
alert(document.images("1").src)
if(document.images("1").width<300) document.images("1").width=400
</script>
解决方案 »
- javascript 问题
- Ext TabPanel 第二次加载无法显示,第一次正常显示。
- 请高手讲解下js的自定义对象,以及继承、多态等面向对象的设计
- 如何在FIREFOX下实现copy and paste(一百分赠送啊)
- 动网里摘出来的一段代码,还差什么?大家给看看
- 一个小问题,请各位帮忙,谢谢!
- 关于N个table中的checkbox控制的问题
- 如何使弹出的浏览器禁止使用标题栏上的“×”按钮?
- 这个问题用JavaScript怎样解决?
- 请各位大哥大姐多多帮忙 啊....我30岁了从培训机构学了web前端一直找不到工作怎么办
- 预缓存图象技术
- 用JScript实现VB.Net,C#的[委托Delegate]:
<div style="overflow:scroll; width:300; height:200"><img width="400" height="300" alt="this is a img"></div>
<img src="zz_hdb.gif" id=outimg>
<script>
function imgfunction(){
if (outimg.width>300) outimg.width=300;
if (outimg.height>200) outimg.height=200;
}
</script>
</body>
overflow:hidden;
<div style="overflow:hidden; width:300; height:200"><img alt="this is a img"></div>
<% s_img=request("filename") %>
<html>
<head>
<title>附件内容</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<script>
function showpicture(as_img){
window.moveTo(0,0)
window.resizeTo(window.screen.width,window.screen.height)
document.photo.src=as_img
var img_x,img_y
img_x = window.screen.width - 50
img_y = document.photo.height / ( document.photo.width / (window.screen.width - 50))
document.photo.width=img_x
document.photo.height=img_y
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" onload="showpicture('<%=s_img%>')">
<form name="form1" method="post" action="">
<p align="center"><img name=photo></p>
</form>
</body>
</html>