


A drop-down box with checkbox implemented by js csss_javascript skills
Rendering:
css:
<style type="text/css"> /* 带复选框的下拉框 */ ul li{ list-style: none; padding:0px; margin: 0px; } .select_checkBox{ border:0px solid red; position: relative; display:inline-block; } .chartQuota{ height:23px; float:left; display:inline-block; border:0px solid black; position: relative; } .chartOptionsFlowTrend{ z-index:300; background-color:white; border:1px solid gray; display:none; position: absolute; left:0px; top:23px; width:150px; } .chartOptionsFlowTrend ul{ float:left; padding: 0px; margin: 5px; } .chartOptionsFlowTrend li{ /* float:left; */ display:block; position: relative; left:0px; margin: 0px; clear:both; } .chartOptionsFlowTrend li *{ float:left; } a:-webkit-any-link { color: -webkit-link; text-decoration: underline; cursor: auto; } .chartQuota p a { float: left; height: 21px; outline: 0 none; border: 1px solid #ccc; line-height: 22px; padding: 0 5px; overflow: hidden; background: #eaeaea; color: #313131; text-decoration: none; } .chartQuota p { margin:0px; folat:left; overflow: hidden; height: 23px; line-height:24px; display: inline-block; } .chartOptionsFlowTrend p { height: 23px; line-height: 23px; overflow: hidden; position: relative; z-index: 2; background: #fefbf7; padding-top: 0px; display: inline-block; } .chartOptionsFlowTrend p a { border: 1px solid #fff; margin-left: 15px; color: #2e91da; } </style>
html:
<div class="select_checkBox"> <div class="chartQuota"> <p> <a href="javascript:;" hidefocus="true" title="请选择指标"><span>选择指标</span> <b></b> </a> </p> </div><br> <div class="chartOptionsFlowTrend""> <ul> <li class=""><input type="checkbox" value="1"><span>浏览次数(PV)</span> </li> <li class=""><input type="checkbox" value="1"><span>独立访客(UV)</span> </li> <li class=""><input type="checkbox" value="1"><span>IP</span> </li> <li class=""><input type="checkbox" value="1"><span>新独立访客</span> </li> <li class=""><input type="checkbox" value="1"><span>访问次数</span> </li> </ul> <p> <a href="javascript:;" title="确定" hidefocus="true" class="a_0">确定</a><a href="javascript:;" title="取消" hidefocus="true" class="a_1">取消</a> </p> </div> </div>
js:
<script type="text/javascript"> $(function(){ $(".select_checkBox").hover(function(){ $(".chartOptionsFlowTrend").css("display","inline-block"); },function(){ $(".chartOptionsFlowTrend").css("display","none"); }); }); </script>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Using jQuery to Real-time Update the Selected Status of Check Boxes In web development, we often encounter situations where we need to update the selected status of check boxes in real time. By using jQuery, we can easily implement the function of updating the selected status of the check box in real time. Here's how to use jQuery to accomplish this task. First, we need to prepare a simple HTML structure containing multiple checkboxes:

How to use the checkbox component in uniapp In uniapp, the checkbox component is a common user interaction component and is often used for multi-option selection. This article will introduce how to use the checkbox component in uniapp and provide code examples. Introducing the checkbox component In the page that needs to use the checkbox component, you first need to introduce the uniapp checkbox component. You can add the following code to the .vue file of the page: <template><view>

How to implement a multi-select drop-down box in Vue. In Vue development, the drop-down box is one of the common form components. Normally, we use radio drop-down boxes to select an option. However, sometimes we need to implement a multi-select drop-down box so that users can select multiple options at the same time. In this article, we will introduce how to implement a multi-select drop-down box in Vue and provide specific code examples. 1. Use the ElementUI component library. ElementUI is a desktop component library based on Vue, which provides a rich UI.

How to tell if a checkbox is selected using jQuery? In web development, we often encounter situations where we need to determine whether a check box is selected. This functionality can be easily achieved using jQuery. The following will introduce how to use jQuery to determine whether a check box is selected, and attach specific code examples. First, make sure to include the jQuery library in your HTML page:

How to solve the mobile drop-down box scrolling problem in Vue development. With the popularity of mobile terminals, more and more web applications have begun to be developed for mobile devices. In the process of mobile development, we often encounter a problem, which is the scrolling problem of the drop-down box on mobile devices. On the traditional PC side, the scrolling of the drop-down box is controlled by the browser's default scroll bar, but on mobile devices, there is no scroll bar, so the drop-down box cannot be scrolled. This may cause the user to be unable to select all options in the drop-down box in some scenarios.

jQuery is a popular JavaScript library used to simplify DOM operations, event handling, animation effects, etc. in web development. In web pages, checkboxes are a common form element used to enable users to select multiple options. This article will explore how to use jQuery to handle checkbox selection and deselecting operations, and provide specific code examples. 1. Basic knowledge of check boxes In HTML, check boxes are represented as follows:

How to use JavaScript to achieve drop-down box linkage effect? In developing web pages, drop-down box linkage is a common interactive effect. It dynamically changes the option content of another drop-down box by selecting an option in one drop-down box, thereby achieving linkage between the two. This article will introduce how to use JavaScript to achieve the linkage effect of drop-down boxes, and attach specific code examples. HTML structure First, we need to create two drop-down boxes and add id attributes to them so that JavaScr

Vue component development: drop-down box component implementation method In Vue development, the drop-down box (Dropdown) is a common UI component. A drop-down box is used to display a set of options and allow the user to select one or more options. This article will introduce how to use Vue to implement a simple drop-down box component through specific code examples. First, we need to create a single file component called Dropdown.vue. In the component's template, we can use Vue's instruction v-for to loop through the selections of the drop-down box.
