abstract:<!DOCTYPE html> <html> <head> <title>第一个JS变量</title> </head> <body> <button onclick="playU()">点我啊</button> </body> <
<!DOCTYPE html> <html> <head> <title>第一个JS变量</title> </head> <body> <button onclick="playU()">点我啊</button> </body> <script type="text/javascript"> function playU() { var demo='哈哈,我是第一个JS变量!'; document.write(demo); } </script> </html>
第一个JS的变量,就简单的输出一下吧!,
Correcting teacher:天蓬老师Correction time:2019-04-20 13:37:06
Teacher's summary:document.write(demo);
建议将测试数据输出到控制台:
console.log(demo);