如何讲<input type="file" .....>html控件的显示文本改掉呢? 请高手不吝赐教,不胜感激! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把style="display:none",再做一个文本框,和一个按钮,然后写js代码调用 如fileupload1.click 就可以打开文件对话框了 为了安全,file的value属性是只读的 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Untitled Page</title> <style type="text/css"> /*file容器样式*/a.files{ width: 90px; height: 30px; overflow: hidden; display: block; border: 1px solid #BEBEBE; background: url(/images/fu_btn.gif) left top no-repeat; text-decoration: none;}a.files:hover{ background-color: #FFFFEE; background-position: 0 -30px;}/*file设为透明,并覆盖整个触发面*/a.files input{ margin-left: -350px; font-size: 30px; cursor: pointer; filter: alpha(opacity=0); opacity: 0;}/*取消点击时的虚线框*/a.files, a.files input{ outline: none; /*ff*/ hide-focus: expression(this.hideFocus=true); /*ie*/} </style></head><body> <a href="javascript:void(0);" class="files" id="idFile"> <input name="" type="file" /></a></body></html>/images/fu_btn.gif 这个图片就是按钮图片. RDLC报表通过IP地址访问不能打印 c# webservice中客户端发现响应内容类型为“text/html; charset=utf-8”,但应为“text/xml”。 li标签显示问题 请教问题 关于treeview控件的展开和收缩 关于Dataset的问题!请进! 如何使用 GridView 进行高效翻页? 上传office文件的问题,急等解决办法,谢谢了 shareidea大家用过吗?另外有类似的平台推荐推荐 动态GridView 绑定后的列排序问题 asp.net中如何确定光标在文本框的具体位置 asp.net调用ocx
如fileupload1.click 就可以打开文件对话框了
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Page</title>
<style type="text/css">
/*file容器样式*/
a.files
{
width: 90px;
height: 30px;
overflow: hidden;
display: block;
border: 1px solid #BEBEBE;
background: url(/images/fu_btn.gif) left top no-repeat;
text-decoration: none;
}
a.files:hover
{
background-color: #FFFFEE;
background-position: 0 -30px;
}
/*file设为透明,并覆盖整个触发面*/
a.files input
{
margin-left: -350px;
font-size: 30px;
cursor: pointer;
filter: alpha(opacity=0);
opacity: 0;
}
/*取消点击时的虚线框*/
a.files, a.files input
{
outline: none; /*ff*/
hide-focus: expression(this.hideFocus=true); /*ie*/
}
</style>
</head>
<body>
<a href="javascript:void(0);" class="files" id="idFile">
<input name="" type="file" /></a>
</body>
</html>
/images/fu_btn.gif 这个图片就是按钮图片.