如何获取Jquery旋钮的ID

时间:2015-07-04 10:01:22

标签: javascript jquery jquery-knob

我正在使用jquery knob,我希望在更改功能上获得旋钮的id

$(".dial").knob({
  'min': 0,
  'max': 5,
  'readOnly': false,
  'width': 70,
  'height': 70,
  'dynamicDraw': true,
  change: function(value) {
    console.log("changed to: " + value);
  },
});
<input type="text" class="dial" value="2" id="test" disabled="disabled">

提前致谢

1 个答案:

答案 0 :(得分:3)

public int overdue() { int i = -1; this.sort(); Date Today = new Date(); DateFormat dateFormat = new SimpleDateFormat("dd MMMMM yyyy"); String todayString = dateFormat.format(Today); try { Today = new SimpleDateFormat("dd MMMM yyyy").parse(todayString); } catch (ParseException ex) { Logger.getLogger(HomeworkDiary.class.getName()).log(Level.SEVERE, null, ex); } while (Today.after(diary[i+1].getDue_Date().getTime()) == true) { i++; } return i; } 函数

中尝试this.$.attr('id');

查看有效的 FIDDLE LINK