让textarea自动调整大小的js代码

时间:2011-04-12    点击:97   
复制代码 代码如下:

<!doctype html>
<html>
<head>
<title>自动调整大小的textarea </title>
<meta charset = "utf-8" />
<style type = "text/css">
.editable{cursor:text; font-size:13px; color:#003366;width:80px;line-height:20px;height:20px;font-family:Arial;cursor:text;*overflow-y:hidden; }
</style>
</head>
<body>
<textarea class='editable' onkeydown ="if(event.keyCode==13) return false; " oninput="this.style.height='0px';this.style.height=(this.scrollHeight+'px');" onpropertychange="this.style.height=(this.scrollHeight+'px')" /></textarea>
</body>
</html>
jQuery创建插件的代码分析
Jquery公告滚动+AJAX后台得到数据
jquery中eq和get的区别与使用方法
基于jquery的blockui插件显示弹出层
强大的jquery插件jqeuryUI做网页对话框效果!简单
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved