블로그 이미지
worhkd2

calendar

1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
2012. 3. 7. 18:52 프로그래밍/HTML

<div style='position:absolute;left:50%;top:50%;'>
<div style='position:absolute;width:800px;left:-400px;'>
내용
</div>
</div>

<!-- absolute는 좌표를 초기화 0,0에 맞춘후 -->

<!-- left:50%;top:50%로 가운데에 위치시킨다! -->

<!-- 하지만 정가운데부터 아래로 출력되기때문에 위치 보정을 해주어야하는데 margin-top 과 margin-left를 사용하여 위치를 조정합니다

예) 가로600px 세로 400px 크기의 이미지나 테이블일 경우 다음과같이 정렬

style="position:absolute;left:50%;top50%;margin-top:-200px;margin-left:-300px;"

-->

'프로그래밍 > HTML' 카테고리의 다른 글

HTML 토글매뉴 예제  (0) 2012.03.07
상대경로와 절대 경로 사용예  (0) 2011.10.19
posted by worhkd2
2012. 3. 7. 16:59 프로그래밍/HTML

<html>
<head>
<title>토글메뉴 만들기</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<script language="Javascript">
<!--
function toggleMenu(currMenu){
if (document.all){
thisMenu = eval('document.all.' + currMenu + '.style')
if (thisMenu.display == 'block') {
toggleClose(3)
//thisMenu.display = 'none'
}else {
toggleClose(3)
thisMenu.display = 'block'
}
return false
}else{
return true
}
}
function toggleClose(kVar){
for(i=1;i<=kVar;i++){
eval('document.all.menu'+i+'.style').display='none'
}
}

//-->
</script>


</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="200" border="0" cellspacing="1" cellpadding="0" bgcolor="#EEEEEE">
<tr>
<td height="16"><a href="#" onClick="return toggleMenu('menu1')">메뉴1</a></td>
</tr>
</table>
<span id='menu1'>
<table width="200" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><a href="#">서브1</a></td>
</tr>
<tr>
<td><a href="#">서브2</a></td>
</tr>
</table>
</span>
<table width="200" border="0" cellspacing="1" cellpadding="0" bgcolor="#EEEEEE">
<tr>
<td height="16"><a href="#" onClick="return toggleMenu('menu2')">메뉴2</a></td>
</tr>
</table>
<span id='menu2'>
<table width="200" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><a href="#">서브1</a></td>
</tr>
<tr>
<td><a href="#">서브2</a></td>
</tr>
</table>
</span>
<table width="200" border="0" cellspacing="1" cellpadding="0" bgcolor="#EEEEEE">
<tr>
<td height="16"><a href="#" onClick="return toggleMenu('menu3')">메뉴3</a></td>
</tr>
</table>
<span id='menu3'>
<table width="200" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><a href="#">서브1</a></td>
</tr>
<tr>
<td><a href="#">서브2</a></td>
</tr>
</table>
</span>
</body>
</html>

<script>toggleClose(3)</script>



http://designblack.com/bbs/board.php?bo_table=tip&wr_id=76&page=2 디블님 자료 퍼옴

'프로그래밍 > HTML' 카테고리의 다른 글

HTML 내용 가운데 출력하기  (0) 2012.03.07
상대경로와 절대 경로 사용예  (0) 2011.10.19
posted by worhkd2
2012. 3. 5. 03:40 DataBase
select * from 테이블 where column like %name%

iBATIS SQL LIKE 검색하기

ibatis는 보통 변수 표시를 #var# 식으로 하는데, 이게 PrepareStatement 형식으로 바뀌면서 '%?%'가 되어 오류가 발생한다.

MySQL :
SELECT * FROM tbl_name WHERE column_name LIKE "%$username$%"

MySQL concat() 함수를 사용
WHERE COLUMN1 LIKE CONCAT('%', #keyword#, '%')

ORACLE :
SELECT * FROM tbl_name WHERE column_name LIKE '%' || #username# || '%'

SYBASE/SQL SERVER
SELECT * from tbl_name WHERE column_name LIKE '%' + #username# + '%'
posted by worhkd2
prev 1 2 3 4 5 6 7 8 ··· 20 next