js
脏颜
这个作者很懒,什么都没留下…
展开
-
js中的输出方式
1.console.log方法(控制台中输出)2.alert方法3.document.write方法(支持在字符串中写入标签)原创 2021-07-14 23:30:21 · 88 阅读 · 0 评论 -
HTML中使用JavaScript的三种方式
1.直接在页面的script标签中写js代码2.引入外部的js文件<html> <head> <script src=".js"></script> </head> <body> </body></html>3.直接嵌套在HTML语句中原创 2021-07-14 23:15:07 · 488 阅读 · 0 评论 -
js报错:Cannot set property ‘onclick‘ of null
js报错:Cannot set property ‘onclic’ of null代码:<html> <head> <meta charset="UTF-8"> <title>sample</title> </head> <body> <script> var div =document.que原创 2021-07-14 18:23:25 · 171 阅读 · 0 评论