<div class="htmlarea"> <textarea id="runcode87527"> <title> js激活和禁用input文本_脚本之家</title> <meta name="generator" content="editplus"> <meta name="author" content=""> <meta name="keywords" content=""> <meta name="description" content=""> <script type="text/javascript"> function $(id) {return document.getElementById(id)} function editInput(tag) { obj = $(tag); if(!obj) return false; obj.style.backgroundColor = "#ADA8A7"; $('bt').onclick=function() { obj.disabled = false; obj.style.backgroundColor = "#fff"; } } </script> <input type="text" value="test" disabled id="test"> <input id="bt" type="button" value="修改"> </textarea><br><input onclick="runEx('runcode87527')" type="button" value="运行代码"> <input onclick="doCopy('runcode87527')" type="button" value="复制代码"> <input onclick="doSave(runcode87527)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>