Home > Web Front-end > JS Tutorial > 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
Release: 2016-05-16 18:00:22
Original
1074 people have browsed it

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
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template