• 弹窗输出: 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"

相关文章: