Show input text inside a div? #546
Answered
by
alexandremjacques
cipriano200
asked this question in
Q&A
-
Does Unpoly has an API to put value from an input inside a div? Or any other solution?
|
Beta Was this translation helpful? Give feedback.
Answered by
alexandremjacques
Oct 26, 2023
Replies: 1 comment 1 reply
-
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 <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;
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cipriano200
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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):