fmpq.com
源代码:
点击运行
<!DOCTYPE html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> </head> <html> <body> <form> 地址:<br> <textarea id="mytxt"> 342 Alvin Road Ducksburg</textarea> </form> <p>单击下面的按钮禁用文本区域</p> <button onclick="disableElement()">禁用文本区域</button> <script> function disableElement(){ document.getElementById("mytxt").disabled=true; } </script> </body> </html>
运行结果