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

jquery implements select drop-down box beautification special effects code

PHPz
Release: 2018-09-29 10:55:19
forward
1713 people have browsed it

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>
Copy after login

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!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template