Jquery - 在此代码中更改type = Checkbox而不是select

时间:2014-04-16 11:30:45

标签: javascript jquery select checkbox

我有这段代码给了我选择下拉列表及其标签

LeaveRuleAdapter.method('getFormFields', function() {
    return [
            [ "employee_can_apply", {"label":"Employees can apply for this leave type","type":"select","source":[["Yes","Yes"],["No","No"]]}]
});

我有2个问题,

1. Is above codes are written on jquery or it's any jquery plugin ? 
2. Is there any way to include checkboxes insted of select.

(我是jquery的初学者,所以不介意这个问题是否有问题)

1 个答案:

答案 0 :(得分:0)

  1. 它不是jQuery

  2. 我不知道代码,但你可以试试这个:

    LeaveRuleAdapter.method('getFormFields', function() { 
    return [["employee_can_apply", {"label":"Employees can apply for this leave type","type":"checkbox"}]]});