document.write() 可用于直接向 HTML 輸出流寫內容。簡單的說就是直接在網頁中輸出內容。 第一種:輸出內容用“”括起,直接輸出""號內的內容。 <script type="text/javascript"> document.write("I love JavaScript!"); //內容用""括起來,""里的內容直接輸出。 </script> 第二種:通過變量,輸出內容 <script type="text/javascript"> var mystr="hello world!"; document.write(mystr); //直接寫變量名,輸出變量存
1 回答
舉報
0/150
提交
取消
2022-03-23
一般是小于,也可以使之等于有自己的發展方向很好