代码如下:<!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> <meta charset=utf-8 /> <title>js模拟select</title> </head> <style> *{ margin:0; padding:0;} li{ list-style:none;} body{ font:12px "宋体"; color:#666;} .select_down{ margin:100px auto; position:relative; width:600px; min-height:200px; height:auto!important; height:200px; border:1px s...
1.样式引用:代码如下: <link rel="stylesheet" href="~/Js/Ddl_Chosen/chosen.css" />2.由于应用了Jquery,所以引用Jquery。(下载地址)代码如下: <script src="<%= ResolveUrl("~/Js/Jquery.js")%>" type="text/javascript"></script>3.相关Js配置代码如下: <asp:DropDownList ID="ddlCountry" runat="server" data-placeholder="Choose a Country..." Width="200px" class="chzn-select"> ...
在网站建设中,特别是做商城和产品网站,通常会用到导航弹出菜单,像是jquery写的仿京东导航菜单,一个经典的左侧多级导航菜单,学会了可以任意改变布局。京东菜单已经有不少JS前端爱好者仿写过,今天蚂蚁网络重新与大家分享一款仿京东商城的商品多级分类菜单,精简版代码 先看下jquery仿京东导航效果: 前端html代码如下: 代码如下:<ul> <li><a href="#">baidu</a></li> <div class="tips"> <p><a href="http://www.baidu.com">...
思路:母版頁隱藏控件 從内容頁接收值 JS根據接受的值控制菜單項的現實母版頁:隱藏控件: 代码如下: <asp:Label ID="Lbl_X" runat="server" Text="text" style="display:none"></asp:Label><asp:Label ID="Lbl_Xn" runat="server" Text="text" style="display:none"></asp:Label>JS: <%-- 設置選中--%> <script type="text/javascript"> var X = document.getElementById('<%=this.Lbl_X.ClientID %>').innerText; ...
因为最近有需要用到中国地区三级联动下拉菜单,虽然用公司的框架已经实现,但是看的比较迷茫,就网上找了下相关代码,主要的数据和功能实现都是在js文件中,网上找的地区数据有的地方不完整,需要自己添加,虽然和公司的框架实现的代码不一样,还是先把代码放上了,以后需要的时候可以看看,大家也可以看看! 1.首先是js文件(area.js): 代码如下:function Dsy() { this.Items = {}; } Dsy.prototype.add = function(id,iArray) {...
1.先看效果图: 2.js代码 year_month_day.js 代码如下:year_month_day.js function DateSelector(selYear, selMonth, selDay) { this.selYear = selYear; this.selMonth = selMonth; this.selDay = selDay; this.selYear.Group = this; this.selMonth.Group = this; // 给年份、月份下拉菜单添加处理onchange事件的函数 if (window.document.all != null) // IE { this.selYear.attachEvent("onchange", DateSelector.Onchange); ...
今天本文就为大家挑选了25个非常好的 jQuery 下拉菜单制作教程和示例。 Slide Down Box Menu with jQuery and CSS3 ( 演示 | 下载 )Fancy Drop Down Menus Using CSS and JQuery. ( 演示 | 下载 )Sliding Jquery Menu ( 演示 | 下载 )Create Simple Dropdown Menu Using jQuery ( 演示 | 下载 )Designing the Digg Header: How To & 下载 ( 演示 | 下载 )Easy to Style jQuery Drop Down Menu Tutorial ( 演示 | 下载 )Professiona...
jQuerySmooth Navigation Menu Simple Drop Down Menu Plugin Dropdown, iPod Drilldown, and Flyout styles jQuery and CSS Example Create the Fanciest Drop Down Menu You Ever Saw A Different Top Navigation Simple jQuery Dropdowns Sexy Drop Down Menu with jQuery and CSS How to Create a Drop Down Nav Menu with HTML5, CSS3, and jQuery Reinventing a Drop Down with CSS and jQuery Superfish Animat...
代码如下:<style> .uboxstyle{width:174px;height:39px; float:right;} #uboxstyle{width:174px;height:39px; float:right;} #uboxstyle .select_box{width:174px;height:39px; float:left;} #uboxstyle div.tag_select{display:block;color:#79A2BD;width:174px;height:39px;background:transparent url("images/select01.jpg") no-repeat 0 0;padding:0 10px;line-height:39px;} #uboxstyle div.tag_select_hover{display:block;...
三级下拉菜单的实现: 代码如下:function list(idstr){ var name1="subtree"+idstr; var name2="img"+idstr; var objectobj=document.all(name1); var imgobj=document.all(name2); //alert(imgobj); if(objectobj.style.display=="none"){ for(i=1;i<22;i++){ var name3="img"+i; var name="subtree"+i; var o=document.all(name); if(o!=undefined){ o.style.display="none"; var image=document.all(name3); //alert(image); i...
这是菜单的内容,用ul标签实现菜单: 代码如下:<div id="menu"> <ul> <li><a href="">菜单一</a> <ul> <li><a href="">子菜单1</a></li> <li><a href="">子菜单2</a> <ul><li><a href="">子菜单7</a></li></ul> </li> <li><a href="">子菜单3</a></li> </ul> </li> <li><a href="">菜单二</a> <ul> <li><a href="">子菜单4</a></li> <li><a href="">子菜单5</a></li> <li><a href="">子菜单6</a></li> </ul> </li> </ul> </div> ...
效果如下:这是菜单的内容,用ul标签实现菜单: 代码如下:<div id="menu"> <ul> <li><a href="">菜单一</a> <ul> <li><a href="">子菜单1</a></li> <li><a href="">子菜单2</a> <ul><li><a href="">子菜单7</a></li></ul> </li> <li><a href="">子菜单3</a></li> </ul> </li> <li><a href="">菜单二</a> <ul> <li><a href="">子菜单4</a></li> <li><a href="">子菜单5</a></li> <li><a href="">子菜单6</a></li> </ul> </li> </ul...
点击后慢慢弹出下拉菜单,sky整理收集。 function $(d){ return document.getElementById(d); } // set or get the current display style of the div function dsp(d,v){ if(v==undefined){ return d.style.display; }else{ d.style.display=v; } } // set or get the height of a div. function sh(d,v){ // if you are getting the height then display must be block to return the absolute height if(v==undef...
JavaScript下拉菜单 * { padding:0; margin:0; } body { font-family:verdana, sans-serif; font-size:small; } #navigation, #navigation li ul { list-style-type:none; } #navigation { margin:20px; } #navigation li { float:left; text-align:center; position:relative; } #navigation li a:link, #navigation li a:visited { display:block; text-decoration:none; color:#000; width:120px; heig...
jquery 代码如下:$(document).ready(function(){ $("ul li").hover(function(){ $(this).find("ul:first").show();//鼠标滑过查找li下面的第一个ul然后显示; },function(){ $(this).find("ul:first").hide();//鼠标离开隐藏li下面d的ul; }) $("ul li ul li ul").prev().addClass("bbb");//给li下面ul是aaa的样式的前一个同辈元素添加css; }) css 代码如下:ul, li{padding:0;margin:0;} ul li{float:left;;margin-right:1px;d...