프로그램/Html & Js & Css
[펌] - textarea 에 Tab기능 넣기
영혼과영혼의양식
2009. 3. 30. 15:24
<html>
<head>
<title> New Document </title>
<script language="JavaScript">
function blockKey(item){
if(event.keyCode==9) {
item.focus();
space = " ";
item.selection=document.selection.createRange();
item.selection.text=space;
event.returnValue = false;
}
}
</script>
</head>
<body>
<textarea id="textField" onkeydown="blockKey(this);" cols="70" rows="10"></textarea>
</body>
</html>
[출처] : http://okjsp.pe.kr/