嗨,我有以下复选框和一个按钮。我想选中该框,然后在使用 jquery 单击按钮时调用一个函数。
        <form id="rForm" >
          <table id="testing" class=""    border="1" cellpadding="0" cellspacing="0">
            <tr>
              <td>
                <td> <label class="" for="_person" >Person</label></td>
               <td> <input type="checkbox" class="_person" id="rov" name="person"/></td>
                 <td><input type="button" id="personList" class=""  value="Search" /></td>
              </tr>
          </table>
        </form>
        $(document).ready(function () {
              $("#vendorList").click(function () {
                  if ($("input:checkbox:checked").val() = "vendor") {
                      fnloadlist();
                  }
              });                 
          });
当我使用萤火虫运行时。它在 if 语句中给出错误“ReferenceError:无效赋值左侧”。我尝试了一些不同的东西,但似乎没有任何效果。请帮助,因为我是 jquery 的新手。谢谢