Home  >  Article  >  Web Front-end  >  What is the size of input type='file' in firefox_javascript skills

What is the size of input type='file' in firefox_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:00:221055browse

But how to set this size value, how wide is size="10", and what is the default value? You cannot set it based on your feeling. Check it out with a script:

Copy the code The code is as follows:



I got this result under Firefox:

I found a certain pattern , the default is 208 pixels, and when size="1", it is 85 pixels. The width of each size differs by 6.5 pixels, so we can dynamically set the size value, such as:
Copy code The code is as follows:

if ($.browser.mozilla) { $(this).attr("size", 1 (options.WrapWidth - 85) / 6.5) }

Source: www.cnblogs.com/flowerszhong
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