본문 바로가기
반응형

Web Programing!299

The valide characters are defined 인코딩 에러 The valide characters are defined 인코딩 에러 java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 크롬이나 파이어폭스는 URL을 자동으로 인코딩해서 전송해준다. 하지만 망할 익스(IE)는 문자나 한글을 자동적으로 인코딩이 안되기때문에 오류가 발생한다. var url = 'localhost:8080/main?param=' + encodeURI(param); #문자인코딩, #인코딩에러, #RFC7230, #RFC3986 2021. 11. 30.
[Javascript] 배열 최대값, 최소값 구하기 1. 최대값 var arr = [3, 0, 7, 12, 0, 5, 22]; var maxValue = Math.max.apply(null, arr); 2. 최소값 var arr = [3, 0, 7, 12, 0, 5, 22]; var minValue = Math.min.apply(null, arr.filter(Boolean)); Boolean(3) // true Boolean(0) // false Boolean(7) // true //... arr.filter는 제공된 함수로 구현 된 테스트를 통과하는 모든 요소를 ​​사용하여 새 배열을 만듭니다. 결과적으로 0을 제외한 모든 요소를 ​​가진 새로운 필터링 된 배열을 갖게됩니다. #최소값구하기, #최대값구하기, #javascript최대값구하기, #javas.. 2021. 11. 26.
[Thymeleaf] 타임리프 속성 1. th:each (반복문) - 순서대로 list = 사용할 변수명, i = 인덱스, ${} = 받을 리스트 객체 선택 2. th:with (변수사용) - th:with="변수1=xxx, 변수2=yyy" 식으로 여러 개의 변수 선언 가능 3. th:value (값 넣기) 4. th:text (텍스트 넣기) 5. th:attr (속성 추가) 허용 여부 예 아니오 6. th:classappend (클래스 추가) 7. th:action 8. th:href 9. th:if (조건문) 등록 삭제 #타임리프, #thymeleaf, #타임리프속성, #타임리프class추가, #타임리프if, #타임리프반복문 2021. 11. 25.
[Javascript] selectbox 제어 1. jQuery로 선택된 값 읽기 $("#selectBox option:selected").val(); $("select[name=name]").val(); 2. jQuery로 선택된 내용 읽기 $("#selectBox option:selected").text(); 3. 선택된 위치 var index = $("#test option").index($("#test option:selected")); 4. Add options to the end of a select $("#selectBox").append("Apples"); $("#selectBox").append("After Apples"); 5. Add options to the start of a select $("#selectBox").prepe.. 2021. 11. 23.
반응형