Skip to content

Show input text inside a div? #546

Discussion options

You must be logged in to vote

If you're trying to achieve something like a reactive behavior from Vue or React, I guess there's nothing direct related.

Though, you could achieve what you want with vanilla javacript and Unpoly up.on (https://unpoly.com/up.on):

<p>
  <input type="text" id="myinput">
</p>
    
<div id="mydiv"></div>
up.on('keydown', '#myinput', function (event, element) {
  document.getElementById('mydiv').innerText = event.target.value;
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cipriano200
Comment options

Answer selected by cipriano200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants