图片
CSS
JS广告
便捷
下载
解答
截图
高清壁纸
后台模板
PS插件
网页特效
Css新闻
推荐代码
页面应用
技术文章
图片展示
广告条
广告代码
软件类
在线工具
常用信息
动画制作
图片处理
辅助小工具
转换软件
其他
软件问题
系统问题
网页问题
常识整理
互联网价值
网站
图标
APP
按钮
公告
2013网站频道新版上线,功能持续完善中……
02.17
更新
mac系统PS数位板没有压感解决方案
01.27
查看windows10系统是否激活
08.31
windows10激活失败,亲测最有效的解决方法
08.31
Mac OS 您需要安装旧 Java SE 6 运行环境才能打开
04.10
Adobe adobeau2017英文转换为中文[汉化方法]
04.01
Mac电脑系统翻墙方法
05.26
最全手机APP中的尺寸规范
05.12
中文WebFont解决方案Font-Spider
09.02
互联网
JS控件
按钮
黑色
灰色
白色
蓝色
绿色
黄色
橙色
>
代码
>
表单
文本域textarea增加了高度和宽度控制按钮
上一篇
下一篇
0
作者:vip_260 来源:未知 日期:2010/12/17 14:32:33 人气:
标签:
文本域textarea增加了高度和宽度控制按钮function runcode_open_new(element){var code = document.getElementById(element).value;var win = window.open("", "
文本域textarea增加了高度和宽度控制按钮
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>文本域textarea带有高度和宽度控制按钮</title> <style type="text/css"> /* Reset style */ #s {width:300px; margin:50px;} .s_caption {width:100%; overflow:hidden; margin-bottom:1px; overflow:hidden;} .s_caption span {display:block; float:left; margin:0 5px 0 0px; padding:2px 10px; background:#DDD; cursor:pointer;} .s_caption span:hover {background:#EEE;} #s textarea {width:300px; height:80px; margin:0; padding:0;} </style> <script type="text/javascript"> var addH=1; function addHeight() { if (!document.getElementById('test1')) return flase; var comment = document.getElementById('test1'); var nowH = parseInt(comment.style.height); if (nowH < 250) { nowH+=2; comment.style.height=nowH+"px"; addH++; if (addH > 25){ addH=1; } else { window.setTimeout("addHeight()","10"); } } } function minHeight() { if (!document.getElementById('test1')) return flase; var comment = document.getElementById('test1'); var nowH = parseInt(comment.style.height); if (nowH > 50) { nowH-=2; comment.style.height=nowH+"px"; addH++; if (addH > 25){ addH=1; } else { window.setTimeout("minHeight()","10"); } } } </script> </head> <body> <div id="s"> <div class="s_caption"> <span onclick="addHeight()">放大</span> <span onclick="minHeight()">缩小</span> </div> <div><textarea id="test1" name="test1" tabindex="1" rows="8" style="height:100px">网站频道www.v404.cn </textarea> </div> </div> </body> </html>
加关注
关于我们
帮助中心
意见反馈
设计导航
Copyright 2008
网站频道
All Rights Resverved.
提供:网页特效 JS广告 网站截图 酷站推荐 交流群:3506863
页面执行时间0.0938秒 查询数据库4次