<input type=file id="j" onchange="getValue();" style="-moz-opacity:0;filter:alpha(opacity=0);opacity:0;position:absolute;left:166px;" />
<input id="ye" style="color: green;border: 1px solid green;width:300px;" />
<input type="button" value="File" style="border: 1px solid green;width:80px;" />
</body>
<script language="javascript">
function getValue(){
document.getElementById('ye').value = document.getElementById('j').value;
}
</script>
<input id="ye" style="color: green;border: 1px solid green;width:300px;" />
<input type="button" value="File" style="border: 1px solid green;width:80px;" />
</body>
<script language="javascript">
function getValue(){
document.getElementById('ye').value = document.getElementById('j').value;
}
</script>
谢谢。我之前也想到了用透过色,但是这样做的话,上传按钮就失效了。因为隐藏file的同时,将上传按钮也隐藏了,我们自己添加的ok 按钮,是没有上传功能的
而且我们要求必须通过按钮触发,不能点击file框触发~~~
恩。知道。但是没办法,要求firefox实现这个功能。。赫赫。。我先不改了。就这样吧。以后再找解决方案。