728x90

제이쿼리로 dom 요소 제어하기(selector)

 

$("h1"); // 모든 h1 선택
$("#heading"); // "heading" id를 갖는 요소 선택
$(".warning"); // "warning" 클래스 이름을 갖는 모든 요소 선택

 

 

자바스크립트 vs 제이쿼리 차이점

 

 

자바스크립트로 제어

myElement = document.getElementById("id01");

document.getElementById("id02").remove();

 

제이쿼리 이용 시

myElement = $("#id01");

$("#id02").remove();

728x90

+ Recent posts