<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<img src="Images/logo2.gif" id="img1" width="400">
<script language="JavaScript">
alert(document.getElementById("img1").width);
</script>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<img src="Images/logo2.gif" id="img1" width="400">
<script language="JavaScript">
alert(document.getElementById("img1").width);
</script>
</body>
</html>
解决方案 »
- 如何用javascript cookie存储数组?
- 如何将JavaScript编写的页面时间封装为一个函数
- jsp调用摄像头拍照并保存
- ASP中调用JAVASCRIP函数,是那里错了?
- 过年了,发个帖子散分散福
- 如何动态改变网页的背景图片.即刻结算.
- 怎样获取select中的option value及显示的取值?
- 帮我写个function把: 很简单的!
- 如何判断一个页面是在一个新窗口打开的,还是在一个Frame中打开的?
- 请qisanyou(www.qisanyou.com)快来拿分。
- 用javascript 让一个输入框的背景为灰色,为什么不能用 输入框.style.background-color = "#cccccc"
- 用window.opner.location.reload()刷新页面和用点击右键刷新页面有什么不同?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body onload="alert(document.getElementById('img1').width);">
<img src="Images/logo2.gif" id="img1" width="400">
</body>
</html>