The size="4" is to define the initial size. If it is not defined here, then change the 4 in this.size=(this.value.length>4?this.value.length:4); into 20, the default size of is 20
Second: If you define the width attribute in the style, let its width change according to the content , aren’t the two requirements contradictory? So the width attribute cannot be defined in style here.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn