标签:char doctype utf-8 click htm asc javascrip col ntb
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <script src="js/test.js" type="text/javascript" charset="utf-8"></script> </head> <body style="height: 3000px;"> <button onclick="func()">按钮</button> <div id="box" style="width: 100px;height: 200px;background-color: red"></div> <script type="text/javascript"> var jsDiv = document.getElementById("box") function func(){ jsDiv.style.backgroundColor="yellow" } </script> </body> </html>
标签:char doctype utf-8 click htm asc javascrip col ntb
原文地址:https://www.cnblogs.com/jeco-li/p/10193377.html