<html>
    <head>
        <script src="jquery-1.7.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){
              $("li.text").mouseover(function (){ 
                     $("this").css("background-color", "#AEEEEE")
                });
$("li.text").mouseout(function (){ 
                     $("this").css("background-color", "red")
                });
            });        </script>  
        <style>
            .text {
                width:500px;
                height:50px;
                background-color:#A020F0;
                position:absolute;
                left:20px;
                top:20px;
            }
                .text ul li{
                   list-style:none;
                   background-color:red;
                   width:40px;
                   margin-left:10px;
                   margin-top:10px;
                   float:left;
                    
                }
            </style>
    </head>
    <body>
        <div class="text">
       <ul class="text1">
           <li>1</li>
           <li>2</li>
           <li>3</li>
           <li>4</li>
           <li>5</li>
           </ul>
            </div>

    </body>
    </htm

解决方案 »

  1.   

    楼主你想问什么为什么不说清楚呢,粘一堆代码上来让我们来替你想你要干嘛啊?         <script type="text/javascript">
                 $(document).ready(function(){
                   $("#text1 li").mouseover(function (){ 
                          $(this).css("background-color", "#AEEEEE")
                     });
    $("#text1 li").mouseout(function (){ 
                          $(this).css("background-color", "red")
                     });
                 });
     
            </script>       </head>
         <body>
             <div class="text">
    <ul class="text1" id="text1">
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
                </ul>
              </div>
      

  2.   

    mouse 事件,JQUERY改变 li的css. 
      

  3.   

    <html>
        <head>
    <script src="http://code.jquery.com/jquery-latest.js"></script>
            <script type="text/javascript">
                $(document).ready(function(){
                  $("li").mouseover(function (){ 
                         $(this).css("background-color", "#AEEEEE")
                    });
    $("li").mouseout(function (){ 
                         $(this).css("background-color", "red")
                    });
                });        </script>  
            <style>
                .text {
                    width:500px;
                    height:50px;
                    background-color:#A020F0;
                    position:absolute;
                    left:20px;
                    top:20px;
                }
                    .text ul li{
                       list-style:none;
                       background-color:red;
                       width:40px;
                       margin-left:10px;
                       margin-top:10px;
                       float:left;
                        
                    }
                </style>
        </head>
        <body>
            <div class="text">
           <ul class="text1">
               <li>1</li>
               <li>2</li>
               <li>3</li>
               <li>4</li>
               <li>5</li>
               </ul>
                </div>    </body>建议楼主 找本书 看看吧。锋利的jquery