To take the data from the form and paste in the html code with JS\JQuery?

Asking for help from the knowledgeable:

How to make the data from the form were substituted into the html code using JS or JQuery?

A simple example:
<input type="text" id="form">

<a href="[x]" id="link">link</a>

You need to when you enter in the text shape, the text was immediately set up in the link.
How to do it? Thank you.
July 2nd 19 at 13:52
2 answers
July 2nd 19 at 13:54

Something like that.
July 2nd 19 at 13:56
<input type="text" onchange="pasteIntoLink(this.value);">
<a href id="link">My link</a>

var link = document.getElementById('link');
pasteIntoLink function(value) {
Thank you! - Doris_Hudson41 commented on July 2nd 19 at 13:59

Find more questions by tags Web DevelopmentJavaScriptHTMLjQuery