码迷,mamicode.com
首页 > Web开发 > 详细

html

时间:2015-07-29 06:35:57      阅读:96      评论:0      收藏:0      [点我收藏+]

标签:js

<!doctype html>
<html lang="en">
 <head>
<script>
function setOpacity (o, n) {
 if (typeof (n) == "string") {
 n = eval(n);
 }
 if (o.style.opacity != null) {
 o.style.opacity = n <= 1 ? n : n / 100.0;
 }
 else if (o.style.mozOpacity != null) {
 o.style.mozOpacity = n <= 1 ? n : n / 100.0;
 }
 else {
 o.style.filter = "alpha(opacity=" + (n <= 1 ? n * 100.0 : n) + ")";
 }
 }

  </script>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>

 </head>
 <body>
<img src="E:\Photos\曼诗\0.jpg" onMouseOver="setOpacity(this,90)" onMouseOut="setOpacity(this,100)">

 </body>
</html>


html

标签:js

原文地址:http://5727428.blog.51cto.com/5717428/1679420

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!