利用js改变图片大小 当鼠标放到图片上图片慢慢放大(关键:以图片中心为中心放大)当鼠标离开图片上图片慢慢缩小(关键:以图片中心为中心缩小) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!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=gb2312" /><title>无标题文档</title><script type="text/javascript"> var p=""; function init(){ var img=document.images[0]; img.onmouseover=change; img.onmouseout=change; } function change(e){ var a=e||window.event; var d=0; if(a.type=="mouseover"){ d=1; }else{ d=-1; } if(p){ window.clearTimeout(p); } cs(this,d); } function cs(a,d){ a.style.width=parseInt(a.style.width)+d+"px"; a.style.height=parseInt(a.style.height)+d+"px"; a.style.left=parseInt(a.style.left)-d+"px"; a.style.top=parseInt(a.style.top)-d+"px"; p=window.setTimeout(function(){cs(a,d)},100); } window.onload=init;</script></head><body><img src="csxt.jpg" style="width:400px; height:400px; position:absolute; left:100px; top:100px;" /></body></html>这样看看可以不 jqueryui里的日历插件如何根据数据变换背景 一个js 特效 。 求助:怎么用js来删除一个长字符串的一个子串呢? 关于正则与UBB,采用js正则匹配问题 (求助)鼠标触发效果的代码简化 用js代码怎么才能插入一个flash呢? js:代参函数A作为参数传递时,A参数怎么办 广告站漂的程序代码谁给我》! 请看代码,点单选,为什么弹出undefined的对话框? 寻找javascript写的Html编辑器 如何动态合并单元格 如何取出一个代码块里的每一行代码
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
var p="";
function init(){
var img=document.images[0];
img.onmouseover=change;
img.onmouseout=change;
}
function change(e){
var a=e||window.event;
var d=0;
if(a.type=="mouseover"){
d=1;
}else{
d=-1;
}
if(p){
window.clearTimeout(p);
}
cs(this,d);
}
function cs(a,d){
a.style.width=parseInt(a.style.width)+d+"px";
a.style.height=parseInt(a.style.height)+d+"px";
a.style.left=parseInt(a.style.left)-d+"px";
a.style.top=parseInt(a.style.top)-d+"px";
p=window.setTimeout(function(){cs(a,d)},100);
}
window.onload=init;
</script>
</head><body>
<img src="csxt.jpg" style="width:400px; height:400px; position:absolute; left:100px; top:100px;" />
</body>
</html>
这样看看可以不