fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <style type="text/css"> #ex1{ border:1px solid red; outline:green dotted thick; } </style> <script> function displayResult(){ document.getElementById("ex1").style.outlineColor="#0000FF"; } </script> </head> <body> <div id="ex1">这是一些文本。</div> <br> <button type="button" onclick="displayResult()">修改外边框颜色</button> <p><b>注意:</b> IE8 及以下版本如果要支持 outline 属性,则必须声明 !DOCTYPE。</p> </body> </html>
运行结果