我想有图像按钮“浏览”和“上传”图片上浏览和上传文件按钮
我用下面的代码具有文本框:
CSS
.uploadpathdiv
{
margin:0;
height:44px;
width:464px;
background:url('images/img-upload.png') no-repeat bottom;
}
.uploadpath
{
background:none;
border:none;
width:400px;
height:40px;
margin:0;
padding: 2px 7px 0px 7px;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
}
HTML
<div class="uploadpathdiv">
<input class="uploadpath" name="path" type="text" />
</div>
<img src="/themes/scaccarium/images/button-upload.png" />
<img src="/themes/scaccarium/images/button-browse.png" />
该图片代码是用于“浏览”和“上传”按钮。
请帮我修改上面的代码,以便当我按浏览按钮时,我会得到“文件选择选项”,就像您在使用<input type = "file" name="browse">
时看到的那样。其次,文件的路径必须显示在上面的文本框中。
再次当我按下上传按钮,应该将该文件上传
非常感谢你,它看起来像我想要的。 – fawad 2010-06-29 19:27:39