JSFiddle - React, Tailwind, and code Playground
by DeepakKamat
HTML
<iframe id="test" src="testsrc"></iframe>
<hr>
<input type="text" placeholder="your url.." id="userSrc">
<button onclick="testfunction()">Click me</button>
JavaScript
function testfunction() {
var userInput = document.getElementById( 'userSrc' ).value;
document.getElementById('test').src = userInput;
};