js 几种打印输出

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

posted on 2019-07-03 10:22  游荡的鱼  阅读(5184)  评论(0编辑  收藏  举报

导航