當前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
【学习笔记】JS进阶语法一document对象
生活随笔
收集整理的這篇文章主要介紹了
【学习笔记】JS进阶语法一document对象
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
內容整理自《從0到1Javascript快速上手》下半部分-進階語法篇
?
示例:write()方法和writeln()方法區別
?
<!DOCTYPE html> <html><head><meta charset="utf-8"><title>writeln()方法</title><style type="text/css">div{width: 100px;height: 100px;border: 1px;solid silver;}</style><script>document.write("人生苦短")document.write("快來Python")document.write("趕緊行動起來吧");</script></head><body></body> </html>?
?
<!DOCTYPE html> <html><head><meta charset="utf-8"><title>writeln()方法</title><style type="text/css">div{width: 100px;height: 100px;border: 1px;solid silver;}</style><script>document.writeln("人生苦短")document.writeln("快來Python")document.writeln("趕緊行動起來吧");</script></head><body></body> </html>?
<!DOCTYPE html> <html><head><meta charset="utf-8"><title>writeln()方法</title><style type="text/css">div{width: 100px;height: 100px;border: 1px;solid silver;}</style><script>document.writeln("<pre>人生苦短")document.writeln("快來Python")document.writeln("趕緊行動起來吧</pre>");</script></head><body></body> </html>?
?
總結
以上是生活随笔為你收集整理的【学习笔记】JS进阶语法一document对象的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【学习笔记】JS进阶语法一window对
- 下一篇: springboot中下面哪一个作为jp