开发者

UI of input file type

HI

i am using

<input type="file">

it has different UI on IE, Firefox, Chrom开发者_开发百科e and Safari i want something that can generate same UI on all 4 browser.

Is this possible?


http://pixelmatrixdesign.com/uniform/

Uniform will allow you to easily skin the input element for uploads.


Many browsers (at least recent versions of Firefox) don't allow you to type a filename any more, as a security precaution. You can only select a file graphically. I believe Chrome is the same way.

What sort of UI are you talking about? If you mean another way to select a file... I don't think there's another way (also a security precaution).


this did the work for me :)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<style type="text/css">
div.fileinputs {
    position: relative;
}

img.fakefile, input.fakefile {
position: absolute;
top: 0px;
left: 0px;
z-index: 1;
}

input.file {
position: relative;
text-align: right;
-moz-opacity:0 ;
filter:alpha(opacity: 0);
opacity: 0;
z-index: 2;
}</style>

<script type="text/javascript">
function HandleFileButtonClick() 
  {    
    document.getElementById("xyz").value =document.getElementById("abc").value; 
    }  


</script>
</head>

<body>
<div class="fileinputs">
    <input type="file" id="abc" class="file"  onchange="HandleFileButtonClick();" />
        <input type="text" id="xyz" class="fakefile" />
        <img src="browse button.bmp" class="fakefile" style="position: absolute; left: 150; top: 0" width="61" height="22"/>
</div>
</body>
</html>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜