jsp tech
https://www.w3big.com/ko/jsp/jstl-function-escapexml.html
JSTL 경우 fn : escapeXml () 함수
JSTL 경우 fn : escapeXml () 함수 JSP 표준 태그 라이브러리 FN : escapeXml () 함수는 XML 태그의 문자를 무시합니다. 문법 FN 다음과 같이 () 구문 escapeXml 기능은 다음과 같습니다 ${fn:escapeXml(<要转义标记的
www.w3big.com
이런식으로도 쌉가능
$('div.aaa > ul > li[class=bbb] input[name=ccc]')
<form:input cssStyle="width:calc(100%-200px); ime-mode:active;" cssClass="aaa">
$('tr.orders th').click(function(){
...
});
함수안에다가 제이쿼리 클릭함수 쓰는것도 가능.
function init(){
$('aaa').click(function(){
.....
});
}
$('p.title')
.each(function(){
$(this)
.children('a')
.click(function(){
$('#form1 input[name=aaa]').val($(this).parent().children('span').eq(0).text());
})
})
$('p.aaa a img').click(function(){
....
});
https://junghn.tistory.com/m/entry/jQuery-jQuerygrep-%EC%82%AC%EC%9A%A9-%EB%B0%A9%EB%B2%95
[jQuery] 제이쿼리 배열 필터링 방법/ jQuery.grep 사용법과 예제
jQuery - $.grep() $.grep()는 배열의 모든 항목을 받아 콜백 함수에 의해 필터 함수를 만족하는 배열을 반환시키는 함수입니다. return 값이 true인 결과들만 새로운 배열에 저장하기 때문에 원래의 array
junghn.tistory.com
$('#aaa').append(val);
$('#aaa').prepend(val);
$($('#aaa').get(ccc)).after(sss);
var form=$('<form</form>');
form.attr({
method: ...
action: ...
});
in javascript, also can use ${pageContext.request.contextPath}
form.append($('<input/>', {type:'hidden', name: 'aaa', value: sss}));
form.appendTo('body');
form.submit();
var aaa = function(){
return {init: init}
function init(){
....
}
}();
$('button[name=aaa]').click(function(){});
<fmt:formatDate value="<%=new java.util.Date()%>" pattern="yyyyMMddHHmmss"/>
$.each($('input[name="aaa"]:radio'), function(index, el){
$(el).prop('disabled', true);
$(el).parent('aaa').find('ddd').text("");
$(el).closet('label > span[name="aaa"]').text("");
});
var aaa = $('input[name="aaa"]:checked').data('ccc');
<input type="radio" name="aaa" data-ccc="111">
window.addEventListener('message', function(e){
...
});
window message
window.postMessage
iframe
https://ohgyun.com/532
window.postMessage 이해하기
발생일: 2014.11.30 키워드: postMessage, message 문제: window.postMessage()에 대한 메모이다. 해결책: 일반적으로 스크립트는 동일 근원 정책에 의해, 프로토콜, 도메인, 포트 중 어느 하나라도 다른 경우엔
ohgyun.com
https://developer.mozilla.org/en-US/docs/Web/API/Window/message_event
Window: message event - Web APIs | MDN
The message event is fired on a Window object when the window receives a message, for example from a call to Window.postMessage() from another browsing context.
developer.mozilla.org
document.body.offsetWidth
window.screen.height
$('#id .classname').click(function(){
var aaa = $(this).attr('name');
var _top = $('aaa').offset().top - 100;
$('html, body').animate({scrollTop._top}, 1000);
$('.aaa').children('li').each(function(i){
if(_cnt > i){$(this).attr('style', 'display:none;');}
$('.aaa').children('li').eq(0).attr('aaa', 0).focus();
$('.aaa').children('li').length;
$('#id1, #id2..').keypress(function(e){});
});
blur keyup도 있음
});
https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=dbjina&logNo=221124483583
$(document).on('click', id, function), 아이디에 이벤트 걸기
보통 jquery 로 이벤트를 걸 때 $(id).click(function() { } ); 형태로 많이 사용한다. 위의 경우로 사용할 ...
blog.naver.com
$(document).on('click', '[data-action="aaa"]', function(e){});
$.trim(aaa);
$('#a').removeClass('b').addClass('c');
$('#a').find('.a').removeAttr('b');
$('body').removeClass addClass etc...
eval(functionname+'()');
$aaa.find('.a').text('aaa');
function close(data){
eval(aaa+"(data)");
}
const b = [
<c:forEach items='${aaa}' var='bbb' varStatus='ccc'>
{
ddd: '${eee}'
}
<c:if test='${!status2.last}'>,</c:if>
</c:forEach>
]
자바스크립트 안에서도 c태그 사용가능...
function aaa(){
$('#aaa').change((e)=>{...});
}
requestScope 관련
https://erim1005.tistory.com/m/entry/JSP-forward%EB%90%9C-%ED%8E%98%EC%9D%B4%EC%A7%80%EC%97%90%EC%84%9C-requestgetRequestURI-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0
[JSP] forward된 페이지에서 request.getRequestURI 사용하기
Spring MVC 상에서 request.getRequestURI() 함수를 사용할 때 Controller 단에서는 제대로된 주소가 나온다. 하지만 jsp view 페이지에서는 /WEB-INF/views/.. 경로가 나오게 된다. 이는 Spring 에서 forward 하기 때문인
erim1005.tistory.com
$(window).width()/2;
$(`\${aaa} li.on`).position().left;
$('#aaa').scrollLeft(100-50);
그리고 이런식의 구성도 가능
let a = $("<a>");
a.attr('href', 'aaa');
a.attr('class', 'bbb');
var aform = $('<form></form>');
aform.attr("method","post");
aform.attr("action","<c:out value=''/>");
aform.attr("name","aform");
aform.append($('<input>', {type: 'hidden', name: ..., id: ..., value: ...}));
aform.appendTo('body');
aform.submit();