<div class="htmlarea"> <textarea id="runcode74578"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Zuozu --textarea---addheight によって作成されました</title> <style type="text/css"> /* Reset style */ * { margin:0; padding:0; word-break:break-all; } body { background:#FFF; color:#333; font:12px/1.4em Helvetica, Arial, sans-serif; } h1, h2, h3, h4, h5, h6 { font-size:1em; } a { color:#333; text-decoration:none; } a:hover { text-decoration:underline; } ul, li { list-style:none; } fieldset, img { border:none; } input, textarea, select, button { font:12px Helvetica, Arial, sans-serif; } .button { padding:0 10px; height: 22px; border: 1px solid; border-color: #EEE #999 #999 #EEE; background: #DDD; color: #333; line-height: 20px; cursor: pointer; margin-left:2px; } .submit { padding:0 10px; height: 22px; border: 1px solid; border-color: #DDD #CC8305 #CC8305 #DDD; background: #FFA200; color: #FFF; line-height: 20px; letter-spacing: 1px; cursor: pointer; } /* edit style */ #edit { width:300px; margin:50px; } .edit_caption { width:100%; overflow:hidden; margin-bottom:1px; overflow:hidden; } .edit_caption span { display:block; float:left; margin:0 1px; padding:4px 10px; background:#DDD; cursor:pointer; } .edit_caption span:hover { background:#EEE; } #edit textarea { width:300px; height:80px; margin:0; padding:0; } </style> <div id="edit"> <div class="edit_caption"> <span class="tool_bigger" onclick="addHeight()"> </span>ズームイン<span class="tool_smaller" onclick="minHeight()"> </span>ズームアウト</div> <div> <textarea id="comment_content" tabindex="1" rows="8" name="comment_content" style="height:100px"></textarea> </div> </div> </textarea> <br><input onclick="runEx('runcode74578')" type="button" value="运行代码"><input onclick="doCopy('runcode74578')" type="button" value="复制代码"> <input onclick="doSave(runcode74578)" type="button" value="保存代码"> <a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">[Ctrl A すべて選択 注: </a>外部 Js を導入する必要がある場合は、</div> を実行するために更新する必要があります]<script type="text/javascript"> var addH=1; function addHeight() { if (!document.getElementById('comment_content')) return flase; var comment = document.getElementById('comment_content'); 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('comment_content')) return flase; var comment = document.getElementById('comment_content'); 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>