SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html> 
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <script>
        window.onload = function ()
        {
            var oP = document.getElementById("content");
            document.getElementById("txt1").value = oP.innerHTML;
            document.getElementById("txt2").value = oP.innerText;
        }
    </script>
</head>
<body>
    <p id="content"><strong style="color:hotpink;">绿叶学习网</strong></p>
    innerHTML是:<input id="txt1" type="text"><br />
    innerText是:<input id="txt2" type="text">
</body>
</html>