zoukankan      html  css  js  c++  java
  • css里可以加表达式 :expression

    比较强的css

    HTML代码:
    [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]






    css里可以加表达式   :expression

    <style>
     <!--
      .td  { font-size: 9pt; weaver:expression(highlight(this))}
     -->
    </style>
     
    <SCRIPT LANGUAGE="JavaScript">
     <!--
      function highlight(obj){
     var hightlightBgColor = '#d6d6d6';
      obj.onmouseover = function(){
      var o = event.srcElement;

      if(o.tagName=="TD"){
       with(o.parentElement){
        style.backgroundColor = hightlightBgColor;
       }
      }
     }
     
     obj.onmouseout = function(){
      var o = event.srcElement;
      if(o.tagName=="TD"){o.parentElement.style.backgroundColor = '';}
     }
    }
     function ControlContent01(){
        if (contentid01.style.display == 'none'){
         contentid01.style.display = '';
      imgarrow01.src = 'gray_up_arrow.gif';
     }
        else {
         contentid01.style.display = 'none';
      imgarrow01.src = 'gray_down_arrow.gif';
     } 

    }


      //-->
    </SCRIPT>





    ==================================================================================

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> CSS样式里使用JavaScript(onmouseover/onmouseout)2</TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">

    <style type="text/css">
    table
    {

     background-color:#000000;
     cursor:hand;
    }

    td
    {
      /*设置onmouseover事件*/
      onmouseover: expression(onmouseover=function (){this.style.borderColor ='blue';this.style.color='red';this.style.backgroundColor ='yellow'});

      /*设置onmouseout事件*/
      onmouseout: expression(onmouseout=function (){this.style.borderColor='';this.style.color='';this.style.backgroundColor =''});
      background-color:#ffffff;
    }
    </style>
    </HEAD>

    <BODY>
    <TABLE cellspacing='1px' border='1'>
    <TR >
     <TD >风儿吹散了蒲公英......    </TD>
     <TD>风儿吹散了蒲公英......   </TD>
     <TD>风儿吹散了蒲公英......   </TD>
    </TR>
    <TR >
     <TD >风儿吹散了蒲公英......    </TD>
     <TD>风儿吹散了蒲公英......   </TD>
     <TD>风儿吹散了蒲公英......   </TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>

  • 相关阅读:
    bootstrap图片上传控件 fileinput
    Redis学习总结(一)--Redis入门
    Spring学习之旅(十五)--SpringBoot
    Spring学习之旅(十四)--缓存
    Spring学习之旅(十三)--使用NoSQL数据库
    Spring学习之旅(十二)--持久化框架
    Spring学习之旅(十一)--JDBC
    Spring学习之旅(十)--MockMvc
    Spring学习之旅(九)--SpringMVC高级技术
    Spring学习之旅(八)--SpringMVC请求参数
  • 原文地址:https://www.cnblogs.com/winner/p/594133.html
Copyright © 2011-2022 走看看