Answers for "js how to display value in html binding"

0

js how to display value in html binding

<!DOCTYPE html>
<html>
<head>
    <title>Test</title>
</head>
<body>

<input type="text" id="demo" name="">
<p id="view"></p>
<script type="text/javascript">
    var id = document.getElementById('demo');
    var view = document.getElementById('view');
    id.addEventListener('input', function(evt){
        view.innerHTML = this.value;
    });

</script>
</body>
</html>
Posted by: Guest on August-28-2021

Code answers related to "js how to display value in html binding"

Code answers related to "Javascript"

Browse Popular Code Answers by Language