.includes()
// IE8 : custom declaration of indexOf()
if(!Array.indexOf){
Array.prototype.indexOf = function(obj){
for(var i=0; i<this.length; i++){
if(this[i]==obj){
return i;
}
<!-- Change your id from "myUserId" to "my******" --> | |
<c:forEach var="i" begin="0" end="${fn:length(id)-1}"> | |
<c:choose> | |
<c:when test="${i <= 1}"> | |
<c:out var="${id.charAt(i)}" /> | |
</c:when> | |
<c:otherwise> | |
<c:out var="*" /> | |
</c:otherwise> |
<!-- Tested on 2016. 12. 5. --> | |
<body> | |
<!-- IE8 --> | |
<!--[IF IE 8]> | |
<p>isIE8</p> | |
<![endif]--> | |
<!-- IE9 --> | |
<!--[IF IE 9]> | |
<p>isIE9</p> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>hideHref</title> | |
</head> | |
<body> | |
<a href="javascript:;" onclick="javascript:linkFunc('http://www.google.com');">www.hiddenHref.com</a> | |
<script> | |
function linkFunc(link) { | |
window.open(link, '_self'); |
function restoreHtml(content){ | |
if(content == "" || $.trim(content) == ""){ | |
return content; | |
} | |
content = content.replace(/\</gi,"<"); | |
content = content.replace(/\>/gi,">"); | |
content = content.replace(/\&lt;/gi,"<"); | |
content = content.replace(/\&gt;/gi,">"); | |
content = content.replace(/\[\\\"\\\'][\\s]*javascript:(.*)[\\\"\\\']/gi, "\"\""); |
/* COMMON */ | |
SELECT * | |
FROM Person | |
JOIN Worker | |
ON Person.id = Worker.id; | |
/* Oracle (Same as above) */ | |
SELECT * | |
FROM Person, | |
Worker |
/* | |
File Upload | |
on Spring project | |
*/ | |
/* | |
<form> in jsp need enctype attribute. For example: | |
<form name="formA" id="formA" method="post" enctype="multipart/form-data" action="[your_address]"> | |
... | |
</form> |
<c:forEach items="${list}" var="item" varStatus="stat"> | |
<!-- varStatus has index attribute that counts automatically --> | |
<c:if test="${stat.index == 0}">the first item</c:if> | |
<a href="${item.link}" <c:if test="${(item.prop1 == 'A') || (empty item.prop1)}"> attr1="val1" </c:if>> | |
<!-- src can use the value --> | |
<img src="/file/${item.prop2}" alt="${item.prop3}" /> | |
</a> | |
</c:forEach> |
/** | |
* If you click 'All' checkbox, other checkboxs are cancelled. | |
*/ | |
/* HTML Sample Code: Checkboxs which contains 'All' checkbox. */ | |
// <input type="checkbox" name="hdBox" id="hdBoxAll" value="30000" onclick="checkHdBoxes(this);" checked /><label for="hdBoxAll">전체</label> | |
// <input type="checkbox" name="hdBox" id="hdBox1" value="30110" onclick="checkHdBoxes(this);" /><label for="hdBox1">지역1</label> | |
// <input type="checkbox" name="hdBox" id="hdBox2" value="30140" onclick="checkHdBoxes(this);" /><label for="hdBox2">지역2</label> | |
// <input type="checkbox" name="hdBox" id="hdBox3" value="30170" onclick="checkHdBoxes(this);" /><label for="hdBox3">지역3</label> | |
// <input type="checkbox" name="hdBox" id="hdBox4" value="30200" onclick="checkHdBoxes(this);" /><label for="hdBox4">지역4</label> |