html input type display only code example
Example 1: js making input non typeable
//Use readonly
<input id="myInput" readonly>
Example 2: using value attribute in input tag makes it read only
use defaultValue tag
//Use readonly
<input id="myInput" readonly>
use defaultValue tag