论坛首页 Java企业应用论坛

关于JS写出滑动栏 效果

浏览 2414 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2008-11-19   最后修改:2008-11-19

以下是完整的HTML 代码  只需要下载包 解压缩就成就OK 了 样式是可以调的
其实隐藏了一个<select>标签
其实你也可以把他显现出来 其实<select>标签跟滑动条的数据 是绑定在一起的哦 ~~
  <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Demo Page: Using Progressive Enhancement to Convert a Select Box Into an Accessible jQuery UI Slider</title>
<link type="text/css" href="js/jquery-ui-themeroller.southstreet.css" media="screen" rel="Stylesheet" />
<link type="text/css" href="js/jquery-ui-slider-additions.css" media="screen" rel="Stylesheet" />
<style type="text/css">
body {font-size: 62.5%; font-family:"Segoe UI","Helvetica Neue",Helvetica,Arial,sans-serif; }

fieldset { border:0; margin: 6em; height: 12em;}
label {font-weight: normal; float: left; margin-right: .5em; font-size: 1.1em;}
select {margin-right: 1em; float: left;}
.ui-slider {clear: both; top: 5em;}
</style>


<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery-ui.min.js" type="text/javascript"></script>
<script src="js/accessibleUISlider.jQuery.js" type="text/javascript"></script>
<script src="js/themeSwitcher.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
//demo 1
$('select#speed').accessibleUISlider({width: 400});

//demo 2
$('select#valueA, select#valueB').accessibleUISlider({width: 400});

//demo 3
$('select#valueAA, select#valueBB').accessibleUISlider({
width: 460,
labels: 12
});

$('#switcher').loadSwitcher();
});
</script>

</head>

<body>

<form action="#">
<fieldset>
<label for="speed"></label>
<select name="speed" id="speed" style="display:none">
<option value="Slower">1</option>
<option value="Slow">2</option>
<option value="Med" selected="selected">3</option>
<option value="Fast">4</option>
<option value="Faster">5</option>
</select>
</fieldset>
</form>

<!--<div id="switcher"></div>-->
</body>
</html>

 

论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics