JSFiddle - React, Tailwind, and code Playground
by GreenMonster
HTML
<input type="text" class="imagelink">
<div class="loadimage">Добавить</div>
<img id="resultimage" src="">
CSS
.imagelink {
float: left;
width: 300px;
padding: 3px 6px;
height: 24px;
border: 1px solid #CCC;
border-radius: 3px;
}
.loadimage {
float: left;
line-height: 30px;
margin-left: 5px;
padding: 0px 6px;
background: #FFF;
border: 1px solid #CCC;
border-radius: 3px;
}
JavaScript
$(document).ready(function() {
$(".loadimage").click(function() {
$("#resultimage").attr("src", $(".mytext").val());
});
});