61,111
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="jquery-1.7.1.min.js"></script>
</head>
<body>
<div>
<img id="img1" src="2c2e982be5e17beb4c00d759393e7d7d.jpg" width="500" height="400" />
</div>
<script>
$("#img1").mouseover(function(){
$(this).width(1024);
$(this).height(768);
}).mouseout(function(){
$(this).width(500);
$(this).height(400)
})
</script>
</body>
</html>
这是我写的 应该和您定的一样但是 为什么 没有效果呢[/quote]
你确定你的脚本路径对了吗?我再我电脑上面用你的代码是可以的。<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="jquery-1.7.1.min.js"></script>
</head>
<body>
<div>
<img id="img1" src="2c2e982be5e17beb4c00d759393e7d7d.jpg" width="500" height="400" />
</div>
<script>
$("#img1").mouseover(function(){
$(this).width(1024);
$(this).height(768);
}).mouseout(function(){
$(this).width(500);
$(this).height(400)
})
</script>
</body>
</html>
这是我写的 应该和您定的一样但是 为什么 没有效果呢
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="Scripts/jquery-1.7.1.min.js"></script>
</head>
<body>
<div>
<img id="pic" src="sample.jpg" width="500" height="400" />
</div>
<script>
$("#pic").mouseover(function () {
$(this).width(600);
$(this).height(500);
}).mouseout(function () {
$(this).width(500);
$(this).height(400);
});
</script>
</body>
</html>