Home  >  Article  >  Web Front-end  >  jquery implements select drop-down box beautification special effects code

jquery implements select drop-down box beautification special effects code

PHPz
PHPzforward
2016-05-16 15:44:251664browse

This article mainly introduces the implementation of jquery to beautify the select drop-down box. The effect is simple and elegant. It is recommended to everyone. Friends in need can refer to it.

This is a special effect code based on jquery to implement select drop-down box beautification. Users can select the content of the drop-down menu. It is a very practical special effect source code.

The jquery implementation of select drop-down box beautification special effects code shared with everyone is as follows

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/g.css" type="text/css" rel="stylesheet" />
<link href="css/css.css" type="text/css" rel="stylesheet" />
</head>
<body>
<p class="searchbox">
 <p class="searchZone clearfix">
 <form target="_blank">
 <fieldset>
 <label>
 <input type="text" class="text" name="keyword" onblur="if(this.value==&#39;&#39;){this.value=&#39;请输入关键字&#39;;this.style.color=&#39;#aaa&#39;}" onfocus="if(this.value==&#39;请输入关键字&#39;){this.value=&#39;&#39;;this.style.color=&#39;#333&#39;}" value="请输入关键字" />
 </label>
 <p class="left">
 <select style="display: none;" name="mySle" id="mySle">
 <option selected="selected" value="0">全站搜索</option>
 <option value="1">素材搜索</option>
 <option value="2">设计欣赏</option>
 <option value="3">桌面壁纸</option>
 <option value="4">设计教程</option>
 </select>
 </p>
 <label>
 <button type="submit">快给我搜一下</button>
 </label>
 </fieldset>
 </form>
 <script type="text/javascript" src="js/jquery.js"></script>
 <script type="text/javascript" src="js/selectbox.js"></script>
 <script type="text/javascript"> $(document).ready(function() {$(&#39;#mySle&#39;).selectbox();});</script>
 </p>
</p>
</body>
</html>

Running rendering:

Online demonstration address :http://demo.jb51.net/js/2015/jquery-select-xlkmh/

If you want more drop-down box effects, you can click Summary of jquery/JavaScript drop-down box effects.

The above is the jQuery implementation of select drop-down box beautification special effects code shared with you. I hope you can like it. For more related tutorials, please visit jQuery video tutorial!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete