<html>
<head>
<title>
</title>
</head>
<body onunload="pclose()" >
<img src="ss.jpg" name="img1" onload="blowup()" onmouseout="blowup()" onmouseover="reduce()">
<script language="javascript">
<!--
var h=img1.height;
var w=img1.width;
function blowup(){
if(img1.height>=h){
img1.height=h-200;
img1.width=w-200;
}
}
function reduce(){
if(img1.height<h){
img1.height=h;
img1.width=w;
}
}
function pclose(){
alert("欢迎浏览本网页");
}
//-->
</script>
</body>
</html>
按照书上写的,但是事件就是不响应,已经几天了,愁得慌啊。各位路过的大哥大姐,给看看
<head>
<title>
</title>
</head>
<body onunload="pclose()" >
<img src="ss.jpg" name="img1" onload="blowup()" onmouseout="blowup()" onmouseover="reduce()">
<script language="javascript">
<!--
var h=img1.height;
var w=img1.width;
function blowup(){
if(img1.height>=h){
img1.height=h-200;
img1.width=w-200;
}
}
function reduce(){
if(img1.height<h){
img1.height=h;
img1.width=w;
}
}
function pclose(){
alert("欢迎浏览本网页");
}
//-->
</script>
</body>
</html>
按照书上写的,但是事件就是不响应,已经几天了,愁得慌啊。各位路过的大哥大姐,给看看
解决方案 »
- 急!JavaScript 链接数据库问题!!
- js两段代码的比较
- 特殊keycode转换char,谁会?
- 打印问题.大家一定要帮忙呀.斑竹
- 求编辑器开发教程,书籍也可。
- Jquery 循环GridView模版列 ,该怎么循环?。。############在线等! 100%j结贴
- 大家是否做过可以在图象上定义热点的Web组件,或知道的 高分请教
- 一个复选框的问题!!!!怎么做???在线等!
- 如何在表格里,单击右键时弹出菜单?而且要根据表格里的ID不同,而取不同的值
- Extjs中Desktop怎么使用MVC模式开发?
- getElementsByTagName 的对象value值输出
- 小白关于函数执行问题的疑惑?
<body onunload="pclose()" >
<img src="ss.jpg" id="img1" onload="imgload()" onmouseout="blowup()" onmouseover="reduce()">
<script language="javascript">
<!--
var img1 = document.getElementById("img1");
var h;
var w;
function imgload() {
h=img1.height;
w=img1.width;
blowup();
}
function blowup(){
if(img1.height>=h){
img1.height=h-200;
img1.width=w-200;
}
}
function reduce(){
if(img1.height<h){
img1.height=h;
img1.width=w;
}
}
function pclose(){
alert("欢迎浏览本网页");
}
//-->
</script>