更改FileUpload控件中browse按钮的显示文字
2009-11-17 17:22
513 查看
1.
2.
<SCRIPT LANGUAGE="JavaScript"> <!-- function ShowBrowse() { var file1=document.getElementById("file1"); if(file1) { file1.click(); } } function ShowFilename(o) { var filename=document.getElementById("filename"); if(filename) { filename.value=o.value; } } //--> </SCRIPT> <input id="file1" type="file" onpropertychange="ShowFilename(this);" style="display:none" mce_style="display:none" /> <input id="filename" /><button onclick="ShowBrowse()"> 浏览... </button>
2.
<html> <head id="Head1" runat="server"> <title>无标题页</title> <mce:style type="text/css"><!-- a.addfile { background-image: url(http://p.mail.163.com/js31style/lib/0703131650/163blue/f1.gif); background-repeat: no-repeat; background-position: -823px -17px; display: block; float: left; height: 25px; margin-top: -1px; position: relative; text-decoration: none; top: 0pt; width: 65px; overflow:hidden; } a.addfile:hover { background-position: -911px -17px; } input.addfile { cursor: pointer !important; height: 25px; left: -6px; filter: alpha(opacity=0); position: absolute; width: 0px; z-index: -1; } --></mce:style><style type="text/css" mce_bogus="1"> a.addfile { background-image: url(http://p.mail.163.com/js31style/lib/0703131650/163blue/f1.gif); background-repeat: no-repeat; background-position: -823px -17px; display: block; float: left; height: 25px; margin-top: -1px; position: relative; text-decoration: none; top: 0pt; width: 65px; overflow:hidden; } a.addfile:hover { background-position: -911px -17px; } input.addfile { cursor: pointer !important; height: 25px; left: -6px; filter: alpha(opacity=0); position: absolute; width: 0px; z-index: -1; } </style> </head> <body> <form id="form1" runat="server" enctype="multipart/form-data"> <div> <a href="#" mce_href="#" class="addfile" id="al"> <input id="my_file_element" class="addfile" runat="server" type="file" name="file_1" size="1" title="点击选择附件" /> </a> </div> </form> </body> </html>
相关文章推荐
- html file 按钮更改显示文字问题
- FileUpload控件实现单按钮图片自动上传并带预览显示
- FileUpload 改变控件显示的文字
- 设置分录表格的标题,给分录添加按钮,当标题无法显示全部文字时,可修改参数改变标题控件的长度。
- RowEditing 使用(示例) 按钮显示文字更改
- Fileupload控件点击“浏览”按钮,选择图片后需要立即显示所选择的图片
- MFC让按钮控件显示*.ico图标和文字说明
- FileUpload控件“浏览。。”按钮显示的“浏览。。”用图片显示
- MFC入门(三)-- MFC图片/文字控件(循环显示文字和图片的小程序)
- Python3 Tkinter基础 Button text,fg在窗体中添加一个按钮,在按钮上显示文字 并 设置文字的颜色
- Python3 Tkinter基础 Button Label Frame 单击按钮,Label中显示的文字更换 StringVar textvariable
- 创建有一个文本框和三个按钮的小程序 当按下每个按钮时 使不同的文字显示在文本框中
- 解决ListCtrl控件第一列文字不能居中显示的问题
- ultraToolbarsManager显示文字的更改
- ORACLE 11g EM 网页显示按钮上的文字为乱码
- div小型浮动层,类似锚点提示文字,鼠标点击按钮显示/隐藏
- 将数字(类似金钱)显示在控件中,你可以输入输出并且可以将数字转换成文字
- Windows XP下static控件文字显示为倾斜或是乱码的原因分析
- css 文字按钮实现样式submit按钮以文本的形式显示出来
- FileUpload控件上传图片并自动生成缩略图、带文字和图片的水印图