日期:2014-05-16  浏览次数:20585 次

jquery设置table 鼠标移动、离开、点击样式,同时css设置table滚动条(访tablePanel)
<html> 
    <head> 
<SCRIPT type=text/javascript src="../../jquery/jquery-2.0.1.min.js"></SCRIPT>
    <style type="text/css"> 
               /*所有内容都在这个DIV内*/ 
        div.all { 
            border: 1px solid #4BB3E2; 
            width: 100%; /*这个宽度可根据实际需要改变*/ 
            clear: right; 
        } 
         
        /*表头在这个DIV内*/ 
        div.title { 
            width: 100%;
            background-color: #4BB3E2;
        } 
        /*内容在这个DIV内*/ 
        div.content { 
            width: 100%; 
            overflow: scroll;  /*总是显示滚动条*/ 
            overflow-x: hidden; /*去掉横向滚动条*/ 
            height: 200px; 
        } 
        div.title_left { 
            float: left; 
            margin-right: 17px; 
        } 
        div.content_left { 
            float: left; 
        } 
         
        .main_table { 
            width: 100%; 
            border: 1px solid #4BB3E2; 
            border-collapse: collapse;  /*边线与旁边的合并*/   
            table-layout:fixed; 
        } 
        .main_table tr th {   
            border: 1px solid #4BB3E2;  
            background-color: #4BB3E2;
            font-size:14px; line-height:35px; background:#4BB3E2; border:solid 1px #BEE5F9;
            overflow: hidden;  /*超出长度的内容不显示*/   
            /*word-wrap: break-word;  内容将在边界内换行,这里显示省略号,所以不需要了*/   
            word-break: break-all;  /*字内断开*/   
            text-overflow: ellipsis;&nb