JSFiddle - React, Tailwind, and code Playground

by dimachen

HTML

<input type="text" id="myTextField"/>
<input type="submit" id="byBtn" value="Изменить" onclick="change()"/>

JavaScript

function change() {

var name = document.getElementById('myTextField').value;
alert("Привет " + name + "!");
       
}