Answers for "can a input field increase width automatically"

1

input width autosize

<input 	id="txt" 
		type="text" 
        onkeypress="this.style.width = (this.value.length + 1) + 'em';">
Posted by: Guest on October-26-2020
0

input width doesn't increase automatically

<input id="txt" type="text" onkeypress="this.style.width = ((this.value.length + 1) * 8) + 'px';">
Posted by: Guest on June-15-2021

Code answers related to "can a input field increase width automatically"

Browse Popular Code Answers by Language