关于鼠标在图片按钮上按下的效果问题 你要是想得到这种效果你就得做两个图片当onmousedown时切换另一图片 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你要是想得到这种效果你就得做两个图片当onmousedown时切换另一图片 没有办法了吗? up up <img onClick=addsubmit() onMouseOut="ChgImg('../img/tianj1.jpg')" onMouseOver="ChgImg('../img/tianj2.jpg')" src="../img/tianj1.jpg" style="CURSOR: hand"> 这是我写的用两张图片,有效果 个图片按钮,内容为“重置” 为其添加鼠标事件(1) 当鼠标移动到图片上为 ‘手’ 形(2) 当鼠标按下时能感觉到 按钮向下按动的效果(3) 当鼠标松开的时候 按钮向上弹起(4) 当鼠标移开 鼠标正常 可用CSS来实现.<html><head><style><!--.over4set {cursor:hand; color: #FFFFFF; background-color: #00CC00; border: 2 #00FF00 ridge; TEXT-DECORATION: underline; TEXT-ALIGN: CENTER;}.out4set {color: #000000; TEXT-ALIGN: CENTER; vertical-align: bottom}//--></style><title></title><body><INPUT TYPE="button" onmousemove="this.className='over4set'" onmouseout="this.className='out4set'" value="button"></body></html> 大哥 不是按钮 是一个图片啊啊啊啊啊啊啊~而且 我要的是onmousedown的效果 就是按下按钮能有“按钮下陷”的感觉 <img name="pic" src="images/pic.jpg" width="62" height="29" border="0" alt="" onMouseOver=high(this) onMouseDown="reset();" onMouseOut=low(this)> 其实原理都差不多借用一下Purpleendurer(Purplenendurer)的代码,呵呵<html><head><style><!--.over4set{cursor:hand; color: #FFFFFF; background-color: #00CC00; border: 2 #00FF00 ridge; TEXT-DECORATION: underline; TEXT-ALIGN: CENTER;}.out4set{cursor:hand; color: #FFFFFF; background-color: #00CC00; border: 1 #00FF00 ridge; TEXT-DECORATION: underline; TEXT-ALIGN: CENTER;}//--></style><title></title><body><INPUT TYPE="button" onmousemove="this.className='over4set'" onmouseout="this.className='out4set'" value="button"><table border=0><tr><td class=out4set onmousemove="this.className='over4set'" onmouseout="this.className='out4set'" ><<img name="pic" src="images/pic.jpg" width="62" height="29" border="0"></td></tr></table></body></html> 上面的是鼠标移进移出的效果变化,把onmousemove改为onmousedownonmouseout改为onmouseup就合搂主的要求差不多了 多谢各位大侠了! 使用fokker(独孤龙) 的方法挺好!但是小弟想用 Struggling(EO)的方法 不知道onMouseOver=high(this)、onMouseOut=low(this)是什么 怎么用啊! 总是提示有错! 怎么没有高手肯帮忙吗?onMouseOver=high(this)、onMouseOut=low(this)到底怎么使用?? UP js的mousemove()方法的移动方向问题? 用JS写了一个遍历文件夹获取每个文件信息的网页,但是点打开浏览对话框,选择路径时总提示“没有权限”,求高人指点 网易那种在文章左下角插入文章是怎么实现的? 高手请进 javascript解密问题 能不能在textarea输入框中实时统计行的数量 速求用javascript取得父页面的链接地址!!! iframe 内的页面如何获得父页面js文件内定义的函数 谁知道左边那个“论坛列表”的效果是怎么作出来的?可给代码吗? JsonP跨域问题 js 如何获取gif文件的时长? 帮忙看看这段代码?狂急! 赐教!
当onmousedown时切换另一图片
这是我写的用两张图片,有效果
(2) 当鼠标按下时能感觉到 按钮向下按动的效果
(3) 当鼠标松开的时候 按钮向上弹起
(4) 当鼠标移开 鼠标正常 可用CSS来实现.<html>
<head>
<style>
<!--
.over4set {cursor:hand; color: #FFFFFF; background-color: #00CC00; border: 2 #00FF00 ridge; TEXT-DECORATION: underline; TEXT-ALIGN: CENTER;}.out4set {color: #000000; TEXT-ALIGN: CENTER; vertical-align: bottom}
//-->
</style>
<title></title>
<body>
<INPUT TYPE="button" onmousemove="this.className='over4set'" onmouseout="this.className='out4set'" value="button">
</body>
</html>
借用一下Purpleendurer(Purplenendurer)的代码,呵呵
<html>
<head>
<style>
<!--
.over4set{cursor:hand; color: #FFFFFF; background-color: #00CC00; border: 2 #00FF00 ridge; TEXT-DECORATION: underline; TEXT-ALIGN: CENTER;}
.out4set{cursor:hand; color: #FFFFFF; background-color: #00CC00; border: 1 #00FF00 ridge; TEXT-DECORATION: underline; TEXT-ALIGN: CENTER;}
//-->
</style>
<title></title>
<body>
<INPUT TYPE="button" onmousemove="this.className='over4set'" onmouseout="this.className='out4set'" value="button"><table border=0><tr><td class=out4set onmousemove="this.className='over4set'" onmouseout="this.className='out4set'" >
<<img name="pic" src="images/pic.jpg" width="62" height="29" border="0">
</td></tr></table>
</body>
</html>
把onmousemove改为onmousedown
onmouseout改为onmouseup
就合搂主的要求差不多了