2017년 10월 30일 월요일

jquery input 박스 속성 가져오기

2개다결과는 같다
체크 : true
체크안함: false

$('input:checkbox[id='testId']').is(":checked"));

$('#testId').prop("checked");

http://api.jquery.com/is/
.is() : 속성이 존재하면 true or false
Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.

2017년 10월 22일 일요일

jquery Label 속성 접근 및 변경


JQUERY LABEL 관련 내용

<td scope="row"><label for="info">정보</label></td>


label for 은 document id 처럼 사용할 수 가 있다.


텍스트 변경을 원할 경우


$("label[for = 'info' ].text("정보변경");


이런식으로 접근하면 됨


ex https://stackoverflow.com/questions/9803399/jquery-change-text-from-label

2017년 10월 1일 일요일

JSON CONTAINS COLON

{
  "photo": {
    "reg": {
      "id": 50
    },
    "thumb": {
      "id": 51
    },
    ":original": {
      "id": 53"
    }
  }
}
json에 : 이 포함된경우 아래와 같이하면됨
photo[':original'].id