jquery使用

  1. 除了自己。其它同类元素都取消选中 $(‘.menu_checkbox’).not(this).prop(‘checked’, false);
  2. 获取标签后边的文字,<input type=’checkbox’ />全选 `$("input")[0].nextSibling.nodeValue;`
  3. ajax请求 post json:
$.ajax({
                url: apiPath,
                data: JSON.stringify(postData),
                type: 'POST',
                dataType: 'json',
                contentType: "application/json"
            }).done(function (response) {
                 console.log(response);
            }).fail(function (response) {
                console.log(response);
            });

发表评论

邮箱地址不会被公开。 必填项已用*标注