位置:首页 > 编程专栏 > JavaScript

js span 赋值

js span 赋值
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script>
        window.onload = function () {
            var show = document.getElementById('show');
            show.innerText = 'span赋值内容';
        }
    </script>
</head>
<body>
    <span id="show"></span>
</body>
</html>


C# 社区推荐