繁体   English   中英

jQuery-更改类型=复选框,而不是在此代码中选择

[英]Jquery - change type = Checkbox instead of select in this code

我有这段代码为我提供了一个带有其标签选择下拉菜单

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

我有两个问题

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. 不是jQuery

  2. 我不知道代码,但是您可以尝试以下方法:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM