慕斯卡5410818
2017-09-15 20:39
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gd2312"> <title>制作我的第一个网页</title> </head> <body> <h1>标题1</h1> <script language="javascript"> function visible(cursor,i) <!--设置鼠标移入和移除时图片效果--> { if(i==0) cursor.filters.alpha.opacity=100; else cursor.filters.alpha.opacity=30; } </script> <table border="0" cellpadding="0" cellspacing="0"> <tr> <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1505486015084&di=a425a9e7203df8b262e419dcaff9f1ec&imgtype=0&src=http%3A%2F%2Fimgs.focus.cn%2Fupload%2Fty%2F21935%2Fa_219340089.jpg"border="0" style="filter:alpha(opacity=100)" onMouseOver="visible(this,1)" onMouseOut="visible(this,0)" width="148" height="121"> </tr> </table> </body> </html>
<script language="javascript">
function visible(cursor,i) <!--设置鼠标移入和移除时图片效果-->
{
if(i==0){
cursor.style.opacity=1;
}
else{
cursor.style.opacity=0.3;
}
}
</script>
//是要这样的效果吗?
JavaScript深入浅出
281100 学习 · 1020 问题
相似问题