<input type="file" style="position:absolute;filter:alpha(opacity=0)" hideFocus onpropertychange="document.getElementById('ice').value=this.value"/>
<input type="text" style="width:152px" id="ice"/>
<img src="http://community.csdn.net/logo/images/ajax-in-action.JPG" height="20" align="absmiddle"/>
<input type="text" style="width:152px" id="ice"/>
<img src="http://community.csdn.net/logo/images/ajax-in-action.JPG" height="20" align="absmiddle"/>
解决方案 »
- 求php高手帮忙?获取百度指数flash中具体的数值
- 哪行代码有阴影效果的啊?郁闷
- 请帮着看看这段JS动画展开收缩脚本,急在线等
- Ext 2.1 中 TabPanel 例子中autoLoad:‘ajax1.html'怎么显示不出来?
- 屏蔽框架里显示内容
- javascript一个基础问题,求大大们帮忙,小弟在线等!!!!急`````
- JSp页面传值和Ext JS表单自动填充
- 类似这种规则数据的输出,有哪几种方法?
- 这个错误什么意思?
- 各位老大,我的IE怎么用着用着就出问题了,还问我是否调试,我装的是Win2K ,IE6.0?怎么办?
- 高分求解(关于父子窗口交互和动态表格)
- 在asp.net2.0中,从数据库中读取出的一行数据如何传递到前台页面的javascript中啊?
<div style="position:absolute;top:15;left:-80;width:150;filter:alpha(opacity=0)" >
<input type="file" onpropertychange="a.value=this.value" size=33></div>
function fclick(obj){
with(obj){
style.posTop=event.srcElement.offsetTop
var x=event.x-offsetWidth/2
if(x<event.srcElement.offsetLeft)x=event.srcElement.offsetLeft
if(x>event.srcElement.offsetLeft+event.srcElement.offsetWidth-offsetWidth)x=event.srcElement.offsetLeft+event.srcElement.offsetWidth-offsetWidth
style.posLeft=x
}
}
</script>
<style>
input{border:1px solid #333333;color:#666666;background:#eeeeee;font:normal 12px Tahoma;height:18px}
</style>
<form method="post" action="" enctype="multipart/form-data">
<input id="f_file"> <input type="button" onmouseover="fclick(t_file)" value="选择上传文件">
<input name="upload" type="file" style="position:absolute;filter:alpha(opacity=30);width:30px;" id="t_file" onchange="f_file.value=this.value" hidefocus>
<br><input type="submit" value="提交">
</form>
先把input=file的隐藏,再用文本框来实现