JQuery
-
211001_list,select,containsJQuery 2021. 10. 1. 11:45
DOCTYPE html> Insert title here 오늘의 쇼핑 리스트 운동화 레깅스 양말 져지 안심스테이크 오늘의 메뉴 선택 초밥 스테이크 떡볶이 김치찌개 //ol 아래에 있는 모든 li 중 첫번째 li //$("ol li:first").css("background-color", "yellow"); //각 ol의 첫번째 li만 선택..child $("ol li:first-child").css("background-color", "yellow"); //전체항목에서 '스테이크'를 찾아서 글자크기 1.5배..contains $("li:contains(스테이크)").css("font-size", "1.5em"); //li의 홀수의 css변경..odd홀수, even짝수 $("li:odd").css("bor..
-
211001_div,mouseover,mouseout,empty,hoverJQuery 2021. 10. 1. 11:30
myscript.js /** * */ function randomColor(){ //0~255 var r=parseInt(Math.random()*256); var g=parseInt(Math.random()*256); var b=parseInt(Math.random()*256); var color="rgb("+r+","+g+","+b+")"; return color; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ html DOCTYPE html> Insert title here //js myscript 링크 삽입 div { width: 80px; height: 80px; float: left; border-radius: 100px; margin-right: 10px;..
-
211001_table,button,click,scoreJQuery 2021. 10. 1. 10:34
DOCTYPE html> Insert title here 이름 JAVA ORACLE HTML 결과출력 $("table").css({ "border":"2px inset gray", "border-collapse":"collapse" }); $("th,td").css({ "border":"1px solid gray" }); $("th").css("background-color","pink"); //버튼이벤트 $("#btn").click(function() { //각각의 id값 얻어오기 var name=$("#name").val(); var java=$("#java").val(); var oracle=$("#oracle").val(); var html=$("#html").val(); //각각 null값 체크..
-
211001_span,rgbColor,random,clickJQuery 2021. 10. 1. 10:07
DOCTYPE html> Insert title here 01234 $("div").css({ "width":"120px", "height":"120px", "border":"2px solid black", "float":"left", "font-size":"20pt", "text-align":"center", "line-height":"120px", /* 줄간격 */ "cursor":"pointer", "margin-right":"5px" }); $("span").css("font-size","20pt"); //div의 크기를 일정하게 지정한 후 랜덤 색상 만들기..배경색으로 설정 for (var i = 0; i