본문 바로가기

WEB3

WEB Front(javascript) --자바스크립트에서 필터 기능 만들기const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; // 짝수만 필터링 const evenNumbers = numbers.filter(num => num % 2 === 0); console.log(evenNumbers); // [2, 4, 6, 8, 10] --checkbox 타입의 객체의 값이 있는지 없는지, 아니면 undefined인지 체크하는 방법 var checkbox = document.getElementById("myCheckbox"); var isChecked = checkbox.checked; if (isChecked !== undefined) {     console.log("Checkbox value is defin.. 2024. 5. 15.
WEB Front (jquery, jquery mobile) -- jquery 관련 https://blog.jquery.com/category/jquery/ jQuery | Official jQuery BlogjQuery’s influence on the web will always be evident. When it was first introduced in 2006, jQuery became a fundamental tool for web developers almost immediately. It simplified JavaScript programming, making it easier to manipulate HTML documents, handlblog.jquery.com기존 웹 프로젝트 소스에 data-role="content" 이런식으로 정의 되어있.. 2024. 5. 15.
WEB Front(JSTL) --JSTL c:forEach 2개의 값을 사용하는 방법 컨트롤러에 ArrayList 2개를 넘겨주는데 jsp 페이지에서 2개의 값을 c:forEach 사용하는 방법 andView.addObject("plist",plist); andView.addObject("slist",slist); 이런식으로 c:forEach 안에 varStatus="status"를 써주고 slist[status.index] 붙여주면 2개의 값을 사용할 수 있다. slist는 컨트롤러의 andView에서 키 이름이다.              ${slist[status.index] }         ${tmp.postNo } 참고 사이트 http://javakorean.com/jstl-foreach-%EC%97%90%EC%84%9C.. 2024. 5. 15.
반응형