大佬教程收集整理的这篇文章主要介绍了如何使用jquery更改输入类型=范围中的输入值,最小值和最大值?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我的jquery是:
var A_Route=['A1','A2','A3',.....'A50']; var counter=0; $("input[name='radio-choice']").change(function(){ if ($(this).val() == "on") { $('#slider').val(A_Route[counter]); }
当我选择一个值为ON的单选按钮时,滑块的最小值和最大值应分别自动变为A1和A50.当我滑过滑块时,我的值应该从A1变为A50.
我的Html是:
<div data-role="fieldcontain"> <fieldset data-role="controlgroup" data-type="horizontal"> <legend>Layout view:</legend> <input type="radio" name="radio-choice" id="radio-choice-c" value="on" checked="checked" /> <label for="radio-choice-c">List</label> <input type="radio" name="radio-choice" id="radio-choice-d" value="off" /> <label for="radio-choice-d">Grid</label> <input type="radio" name="radio-choice" id="radio-choice-e" value="other" /> <label for="radio-choice-e">Gallery</label> </fieldset> </div> <div data-role="fieldcontain"> <label for="slider">Room:</label> <input type="range" name="slider" id="slider" value="--------" min=? max=? data-highlight="true" /> </div>
您认为最小和最大代码应该是什么?和
如何将输入值从A1更改为A50?
以上是大佬教程为你收集整理的如何使用jquery更改输入类型=范围中的输入值,最小值和最大值?全部内容,希望文章能够帮你解决如何使用jquery更改输入类型=范围中的输入值,最小值和最大值?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。