I need to create a custom volume slider for a WMP object. The current slider is complicated to modify, and use, is there a simple way to generate a slider on an HTML page that can have it's value passed to a javascript function?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
HTML 5 with Webforms 2 provides an
<input type="range">
which will make the browser generate a native slider for you. Unfortunately all browsers doesn't have support for this, however google has implemented all Webforms 2 controls with js. IIRC the js is intelligent enough to know if the browser has implemented the control, and triggers only if there is no native implementation.From my point of view it should be considered best practice to use the browsers native controls when possible.
The code below should be enough to get you started. Tested in Opera, IE and Chrome.
Here is another light JavaScript Slider that seems to fit your needs.
Yahoo UI library has also a slider control...
I recommend Slider from Filament Group, It has very good user experience
http://www.filamentgroup.com/lab/update_jquery_ui_slider_from_a_select_element_now_with_aria_support/
Here is a simple slider object for easy to use
pagecolumn_webparts_sliders