- 弹窗输出: alert("hello world!")
- 控制台输出: console.log("hello world!")
- 直接输出: document.write("hello world!")
- 输出到html元素: document.getElementById("demoid").innerHTML = "hello world!"
document.getElementById("demoid").innerText = "hello world! innerText"
js 几种打印输出
猜你喜欢
转载自www.cnblogs.com/wanderingfish/p/11124836.html
今日推荐
周排行