题解 | #单向绑定#

单向绑定

https://www.nowcoder.com/practice/728b83e2b9b948dbababcc4a494eefc3

<!DOCTYPE html>
<html>
    <head>
        <meta charset=utf-8>
    </head>
    <body>
    	<input id="input" type="text" />
        <span id="span"></span>

        <script type="text/javascript">
            // 补全代码
            document.getElementById("input").onchange = function(){
                document.getElementById("span").innerHTML = this.value
            }
        </script>
    </body>
</html>

全部评论

相关推荐

10-10 01:10
已编辑
深圳大学 测试开发
面了100年面试不知...:六月到九月,四个项目一个实习,是魔丸吗
投了多少份简历才上岸
点赞 评论 收藏
分享
只因飞飞:今日首绷
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务