输出网页上的文字到网页 document.write (document.getElementsByTagName("body")[0].innerText); 这里的console.context如果换成print可以直接调打印。 代码示例如截图。