Home > Article > Web Front-end > jquery implements select drop-down box beautification special effects code
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==''){this.value='请输入关键字';this.style.color='#aaa'}" onfocus="if(this.value=='请输入关键字'){this.value='';this.style.color='#333'}" 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() {$('#mySle').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!