随笔- 4 文章- 0 评论- 0 ?

<style type="text/css">

body, ul, li

{

margin: 0;

padding: 0;

font-size: 13px;

}

ul, li

{

list-style: none;

}

#divselect

{

width: 186px;

margin: 80px auto;

position: relative;

z-index: 10000;

}

#divselect cite

{

width: 150px;

height: 24px;

line-height: 24px;

display: block;

color: #807a62;

cursor: pointer;

font-style: normal;

padding-left: 4px;

padding-right: 30px;

border: 3px solid #333333;

background: url(xjt.png) no-repeat right center;

}

#divselect ul

{

width: 184px;

border: 1px solid #333333;

background-color: #ffffff;

position: absolute;

z-index: 20000;

margin-top: -1px;

display: none;

}

#divselect ul li

{

height: 24px;

line-height: 24px;

}

#divselect ul li a

{

display: block;

height: 24px;

color: #333333;

text-decoration: none;

padding-left: 10px;

padding-right: 10px;

}

#divselect ul li a:hover

{

background-color: #CCC;

}

p

{

margin: 10px auto;

width: 920px;

}

#n

{

margin: 10px auto;

width: 920px;

border: 1px solid #CCC;

font-size: 12px;

line-height: 30px;

}

#n a

{

padding: 0 4px;

color: #333;

}

</style>

<form id="form1"action="" method="post">

<div id="divselect" class="divselect">

<cite>请选择特效分类</cite>

<ul>

<li><a href="javascript:;" selectid="1">导航菜单</a></li>

<li><a href="javascript:;" selectid="2">下拉select效果</a></li>

<li><a href="javascript:;" selectid="3">select模拟</a></li>

<li><a href="javascript:;" selectid="4">DIVCSS5特效</a></li>

<li><a href="javascript:;" selectid="5">jquery 下拉特效</a></li>

</ul>

</div>

<br />

<div id="divselect" class="divselect1">

<cite>请选择特效分类</cite>

<ul>

<li><a href="javascript:;" selectid="6">导航</a></li>

<li><a href="javascript:;" selectid="7">下拉</a></li>

<li><a href="javascript:;" selectid="8">模拟</a></li>

<li><a href="javascript:;" selectid="9">特效</a></li>

<li><a href="javascript:;" selectid="10">下拉特效</a></li>

</ul>

</div>

<input name="" value="" id="inputselect"/> //获取的数据

</form>

<input type="button" value="get" onclick="get()" />

$(function(){

$.divselect(".divselect", "#inputselect");

$.divselect(".divselect1", "#inputselect");

});  //定义了两个下拉框

function get() {

var dd = document.getElementById("inputselect");

alert(dd.value);

}  //弹出获取的数据

下载示例代码http://www.51xuediannao.com/js/jquery/divselect.html

div模拟的下拉框特效的更多相关文章

  1. div模拟的下拉框特效jquery

    从网上找来的,感觉不错就拿来分享下 <style type="text/css"> body, ul, li { margin: 0; padding: 0; font ...

  2. [原创]HTML 用div模拟select下拉框

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML xmlns=" ...

  3. jquery实现模拟select下拉框效果

    <IGNORE_JS_OP style="WORD-WRAP: break-word"> <!DOCTYPE html PUBLIC "-//W3C// ...

  4. 用div,ul,input模拟select下拉框

    <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...

  5. jq插件又来了,模拟select下拉框,支持上下方向键哦

    好久没来了,更新下插件, 这个原理就是利用的 input[type='hidden']和自定义属性data-value捆绑传值操作的,可是设置默认选项,回调等参数,代码不多,比较简单,吼吼 (func ...

  6. ul -- li 模拟select下拉框

    在写项目中 用到下拉框,一般用 <select name="" id=""> <option value=</option> &l ...

  7. JS Div滚动,下拉框添加属性,年月日下拉条

    创建某一下拉菜单的项: str = str+"<option value='"+i+"'>"+i+"</option>&quo ...

  8. div+css模拟select下拉框

    <!DOCTYPE html><html ><head lang="zh"> <meta http-equiv="Content ...

  9. 轻松使用div模拟select下拉菜单

    没有办法,平时不是万不得已我是不喜欢去模拟各类控件的,一个是麻烦,二个是对性能也有些影响,还是原生的来的实在.老板昨天发话,必须模拟赶紧的,老外最喜欢简洁干净的风格,说的貌似都很在理的样子,业务部也是 ...

随机推荐

  1. JAVA字符串格式化String.format()的使用

    JAVA字符串格式化-String.format()的使用常规类型的格式化 String类的format()方法用于创建格式化的字符串以及连接多个字符串对象.熟悉C语言的同学应该记得C语言的sprin ...

  2. android ProgressBar 样式讲解

    转载自:eoe社区,可惜没找到源地址... 多式样ProgressBar 普通圆形ProgressBar 该类型进度条也就是一个表示运转的过程,例如发送短信,连接网络等等,表示一个过程正在执行中. 一 ...

  3. 如何把双引号包含到echo命令的字符串中

    初涉s h e l l的用户常常会遇到的一个问题就是如何把双引号包含到e c h o命令的字符串中.引号是一个特殊字符,所以必须要使用反斜杠\来使s h e l l忽略它的特殊含义.假设你希望使用e ...

  4. BZOJ 2351 Matrix(哈希)

    题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=2351 题意:给出一个n*m的01矩阵.再给出10个A*B的小01矩阵.判断这些小的矩阵是 ...

  5. BZOJ 2228 礼物(gift)(最大子长方体)

    题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=2228 题意:给出一个只含有NP两种字母的长方体.从中找出只含有字母N的长方体,造型为a* ...

  6. Introducing Microsoft Sync Framework: Sync Services for File Systems

    https://msdn.microsoft.com/en-us/sync/bb887623 Introduction to Microsoft Sync Framework File Synchro ...

  7. iconv字符编码转换

    转自 http://blog.csdn.net/langresser_king/article/details/7459367 iconv(http://www.gnu.org/software/li ...

  8. 线程中无法实例化spring注入的服务的解决办法

    问题描述 在Java Web应用中采用多线程处理数据,发现Spring注入的服务一直报NullPointerException.使用注解式的声明@Resource和XML配置的bean声明,都报空指针 ...

  9. Python3 学习第六弹: 迭代器与生成器

    1> 迭代器 迭代的意思类似递归一般,不断地对一个对象做重复的操作.来看个例子: class Fibs: def __init__(self): self.last = self.now = 1 ...

  10. 宏ut_mem_block_t

    /** This struct is placed first in every allocated memory block */ typedef struct ut_mem_block_struc ...