源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

Jquery实现的一种常用高亮效果示例代码

  • 时间:2022-05-17 02:14 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:Jquery实现的一种常用高亮效果示例代码
[b]如下所示: [/b]
[u]复制代码[/u] 代码如下:
<html> <head>     <title>jquery</title>     <style>         body         {             font-size: 12px;         }         li         {             list-style: none;             height: 34px;             padding-top: 5px;         }     </style>     <script type="text/javascript" src="jquery-1.2.6.pack.js"></script>     <script type="text/javascript"> $(document).ready(function(){        var oInputs = $("ul.demo input");     oInputs.each(function(i){         oInputs.eq(i).focus(function(){             oInputs.eq(i).parent().css("background-color","ccf");         }).blur(function(){             oInputs.parent().css("background-color","");         })      });         oInputs.focus(function(){         $(this).css("background-color","ff9").blur(function(){             $(this).css("background-color","");         });     }) })     </script> </head> <body>     <ul class="demo">         <li>             <h5>                 注册选项</h5>         </li>         <li>用户名:<input type="text" value="" id="name" style="width: 200px" /></li>         <li>密 码:<input type="password" value="" id="pass" style="width: 200px" /></li>         <li>爱 好:<input type="checkbox" value="" />篮球 <input type="checkbox" value="" />足球 <input             type="checkbox" value="" />音乐</li>     </ul>     </script> </body> </html>
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部