Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何仅从两位数长 (XX) 的滑块的 ui.value 中获取最后一位数字。
我试过这个,但它似乎不被接受?
var $lastNumber = ui.value.length-1;
怎么样:
var $lastNumber = ui.value % 10;
尝试:
var sliderVal = ui.value; var $lastNumber = sliderVal.toString().charAt(sliderVal.length-1)