怎么不用uploadify按钮,用js直接调用事件来上传 $('#file框id').uploadify('upload');不过没必要,uploadify上传按钮样式本就是可以自定义的 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 配置buttonText:'<button class="self">上传</button>' $('#file框id').uploadify('upload'); 您的这句的作用是隐藏浏览按钮的吗 这是用代码触发上传,未配置自动上传时需调用该函数上传文件,自动上传则不用你那个需求直接配置buttonText就行了,不用管这个 <!doctype html><html> <head> <title></title> <style> .fileUpload{ width:100px; height:25px; position: relative; vertical-align: middle; text-align: center; overflow: hidden; background: black; color: white; float: left; } .fileUpload span { display: block; position: relative; width:100%; height:100%; } .fileUpload input[type=file] { position: absolute; top: 0px; right: 0px; margin: 0px; display: block; transform: translate(-300px, 0) scale(4); cursor: pointer; opacity: 0; filter: alpha(opacity=0); direction: ltr; width: 100%; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; } </style> </head> <body> <span class="fileUpload"> <span>Upload</span> <input type="file"/> </span> </body></html>这是把上传控件透明掉 可以直接调用事件 变通的方法解决了,可以参考这里 Uploadify隐藏按钮后实现动态上传实现预览效果 判断当前日期是星期几 ajax局部数据刷新问题 找特效 JS 拖曳 关于XML操作的encoding="gb2312"的问题 关于ie10图片旋转 "self.location.reload()"刷新时怎么去掉‘重试’提示? 一百分问个问题!大家进来帮帮忙 请教我的网页要显示"查看源代码"中的某一句.该怎么做啊? 左框架可以刷新右框架吗? js能否判断一个链接的http状态 请问有没有比较好用的jquery弹出浮动窗口插件
你那个需求直接配置buttonText就行了,不用管这个
<!doctype html>
<html>
<head>
<title></title>
<style>
.fileUpload{
width:100px;
height:25px;
position: relative;
vertical-align: middle;
text-align: center;
overflow: hidden;
background: black;
color: white;
float: left;
} .fileUpload span {
display: block;
position: relative;
width:100%;
height:100%;
} .fileUpload input[type=file] {
position: absolute;
top: 0px;
right: 0px;
margin: 0px;
display: block;
transform: translate(-300px, 0) scale(4);
cursor: pointer;
opacity: 0;
filter: alpha(opacity=0);
direction: ltr;
width: 100%;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
}
</style>
</head>
<body>
<span class="fileUpload">
<span>Upload</span>
<input type="file"/>
</span>
</body>
</html>这是把上传控件透明掉 可以直接调用事件