I want to put a word in an <input>
and have a changed output. For example,
Input = Peter
Output = From Peter Parker
function impf1() {
var first = document.getElementById("imp1").value;
var out1 = "print(" + first + ")";
return out1;
console.log(out1);
window.alert(out1);
return false;
}
<h5></h5>
<div class="hr">
<hr />
</div>
<h3></h3>
<center><select>
<option value="python">Python</option>
</select></center>
<center>
<button onclick="impf1()">GET CODE</button>
</center>
This is the desired output: