Search Results for 'textarea'


1 posts related to 'textarea'

  1. 2007/02/15 textarea 자동 조절 - 클릭시-

<html>
<head>
<script>
var x,y
var flag=false
var obj
function table_resize_start(e){
flag=true
if(document.all){
  obj=e.srcElement
  x=obj.style.pixelLeft+10
  y=obj.style.pixelTop+10
  }
else if(document.getElementById){
  obj=e.target
  x=parseInt(obj.style.left.replace("px",""))+10
  y=parseInt(obj.style.top.replace("px",""))+10
  }
}
function table_resize(e){
if(flag){
  if(document.all){
  xx=e.clientX-x
  yy=e.clientY-y
  obj.style.pixelWidth=xx
  obj.style.pixelHeight=yy
  }
  else if(document.getElementById){
  xx=e.pageX-x
  yy=e.pageY-y
  obj.style.width=xx+"px"
  obj.style.height=yy+"px"
  }
  }
}
function table_resize_end(){
flag=false
}

</script>

</head>
<body onmousemove=table_resize(event) onmouseup=table_resize_end()>
<textarea style="position:absolute;top:10px;left:10px;cursor:move;border:solid 2px silver;" onmousedown=table_resize_start(event)>
</textarea>
</body>
</html>


2007/02/15 16:55 2007/02/15 16:55
Tags: