phpschoolÀÇ kisses´ÔÀÇ ±ÛÀÔ´Ï´Ù
Á¤¸» ¾µ¸¸ÇÑ TipÀÔ´Ï´Ù
====================================================
»ç¿ë¹ýÀº Á¦¸ñºÎºÐÀÇ Ä »çÀÌ¿¡ ¸¶¿ì½º¸¦ °¡±îÀÌ Çϸé
Ä¿¼ ¸ð¾çÀÌ ¹Ù²ò´Ï´Ù. ±×¶§ µå·¡±×¸¦ ÇÏ¸é ¸¶¿ì½º°¡ À̵¿ÇÑ
°Å¸®¸¸Å ¼¿ÀÇ Å©±â°¡ ¹Ù²ò´Ï´Ù.
Á¦¸ñ ºÎºÐÀÇ Å¬·¹½º À̸§Àº ¹Ýµå½Ã Àû¾î ÁÖ¼Å¾ß ÇÕ´Ï´Ù.
¼¿ÀÇ »çÀÌÁî°¡ º¯ÇÔ¿¡ µû¶ó input ¹Ú½ºµµ ´Þ¶óÁý´Ï´Ù...
±×·¯³ª »çÀÌÁî°¡ º¯ÇÏ´Â input ¹Ú½º¸¦ ³²¹ß ÇÏ¸é ¹ÝÀÀ ¼Óµµ°¡
´À·ÁÁý´Ï´Ù. ¶ÇÇÑ input ¹Ú½ºÀÇ »çÀÌÁî´Â tdÀÇ cellpadding º¸´Ù
ÀÛ¾Æ¾ß ÇÕ´Ï´Ù.
ÁÖ¼®À» ´Þ¾Æ ³ùÀ¸´Ï ÀÌÇØÇϽôµ¥´Â º° ¾î·Á¿òÀÌ ¾øÀ»°Å¶ó »ý°¢ µË´Ï´Ù.
Å×À̺íÀ» <div> Å×±× ¾È¿¡ ³ÖÁö ¾ÊÀ¸½Ã·Á¸é Å×À̺í ÀÚüÀÇ
»çÀÌÁî´Â ÁöÁ¤ÇØ ÁÖ½Ã¸é ¾ÈµË´Ï´Ù. (td)¸¸ ÁöÁ¤Çϼ¼¿ä
¸»ÁÙÀÓÇ¥ È¿°ú´Â Àü¿¡ ½ºÄð¿¡¼ º»°É·Î ±¸ÇöÇØ º¸¾Ò½À´Ï´Ù.
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=euc-kr">
<style>
.ellipsis {font:9pt "±¼¸²"; width:100%; overflow:hidden; text-overflow:ellipsis; text-align:left; }
.colresize {font:9pt "±¼¸²"; cursor:""; }
.input_box {width:expression(this.parentNode.clientWidth-8); }
</style>
<SCRIPT LANGUAGE="JavaScript">
<!--
var mousedown = false; //¸¶¿ì½º¸¦ ´©¸¥ »óÅÂ
var td = ""; //»çÀÌÁî º¯°æÇÒ td
var td_width; //º¯°æÇÒ tdÀÇ width,
var x = 0; //¸¶¿ì½º µå·¹±×Àü °¡·ÎÀ§Ä¡
function TCstartColResize(obj){
mousedown = true;
td = obj;
td_width = td.width;
x = event.clientX;
}
function TCColResize()
{
if (mousedown){
var distX = event.x - x; //À̵¿ÇÑ °£°Ý
td.width = parseInt(td_width) + parseInt(distX);
}
}
function TCstopColResize(){
mousedown = false;
td = '';
}
function cell_left(obj){//¸¶¿ì½º°¡ ¼¿ÀÇ ¿ÞÂÊÀÎÁö ÃøÁ¤
if(event.offsetX < 5 && obj.cellIndex!=0)
return true;
else
return false;
}
function cell_right(obj){//¸¶¿ì½º°¡ ¼¿ÀÇ ¿À¸¥ÂÊÀÎÁö ÃøÁ¤
if(event.offsetX > obj.width-4)
return true;
else
return false;
}
//¸®»çÀÌÁî½ÃÀÛ
document.onmousedown = function(){
try{
var now_mousedown = window.event.srcElement;
if(now_mousedown.className.toUpperCase()=="COLRESIZE"){
if( cell_left(now_mousedown) ){
now_mousedown = now_mousedown.parentNode.childNodes[now_mousedown.cellIndex-1];
}else if( !cell_right(now_mousedown) ){
return true;//¿À¸¥Âʵµ ¿ÞÂʵµ ¾Æ´Ï¸é »çÀÌÁî Á¶Àý ¾ÈÇÔ
}
TCstartColResize(now_mousedown);
}
}catch(e){ return true; }
}
//¸®»çÀÌÁî
document.onmousemove = function(){
try{
var now_mousemove = window.event.srcElement;
if(now_mousemove.className.toUpperCase()=="COLRESIZE" || td!=""){
//¼¿ÀÇ °¡ÀåÀÚ¸®¸é ¸¶¿ì½º Ä¿¼ º¯°æ
if( cell_left(now_mousemove) || cell_right(now_mousemove) ){
now_mousemove.style.cursor = "col-resize";
}else{
now_mousemove.style.cursor = "";
}
TCColResize(now_mousemove);
}else{
now_mousemove.style.cursor = "";
}
}catch(e){ return true; }
}
//¸®»çÀÌÁîÁ¾·á
document.onmouseup = function(){
try{
var now_mouseup = window.event.srcElement;
//if(now_mouseup.className=="colResize"){
TCstopColResize(now_mouseup);
//}
}catch(e){ return true; }
}
//¸®»çÀÌÁî µµÁß ÅØ½ºÆ® ¼±Åà ±ÝÁö
document.onselectstart = function(){
try{
if(td != ""){
return false;
}
}catch(e){ return true; }
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<div style="width:100%;height:100;overflow-x:auto;overflow-y:auto">
<table width="430" border="0" cellpadding="3" cellspacing="1" bgcolor="#B8B8B8" nowrap style='table-layout:fixed'>
<tr bgcolor="#A5D4D2" align="center" height="25">
<td width="35" class="colresize">¼±ÅÃ</td>
<td width="35" class="colresize">¼ø¹ø</td>
<td width="70" class="colresize">ǰ¸ñ¸í</td>
<td width="30" class="colresize">¼ö·®</td>
<td width="50" class="colresize">´ÜÀ§</td>
<td width="70" class="colresize">³¯Â¥</td>
<td width="70" class="colresize">Àå¼Ò</td>
<td width="70" class="colresize">ºñ°í</td>
</tr>
<tr bgcolor="#FFFFFF" height="27" align="center">
<td><Input type="radio" name="radio"></td>
<td>1</td>
<td><input type='text' class="input_box"></td>
<td><input type='text' class="input_box"></td>
<td><select class="input_box"><option>EA</option></select></td>
<td><input type='text' class="input_box"></td>
<td><input type='text' class="input_box"></td>
<td nowrap class="ellipsis">ºñ°í ºñ°í ºñ°í ºñ°í ºñ°í ºñ°í ºñ°í ºñ°í ºñ°í</td>
</tr>
</table>
</div>
</BODY>
</HTML>








ÀÚ¹Ù½ºÅ©¸³Æ® ÆÁ






Copyright 2010 Tanine. All rights reserved.