有人知道如何将我自己的按钮连接到downloadify库而不是使用
<div id="downloadify"></div>我想把这个赋值给其他按钮或元素。这样我就可以避免使用它的自定义按钮。
lib页面中的demo是这样的:
<script type="text/javascript">
Downloadify.create('downloadify',{
filename: function(){
return document.getElementById('filename').value;
},
data: function(){
return document.getElementById('data').value;
},
onComplete: function(){
alert('Your File Has Been Saved!');
},
onCancel: function(){
alert('You have cancelled the saving of this file.');
},
onError: function(){
alert('You must put something in the File Contents or there will be nothing to save!');
},
transparent: false,
swf: 'media/downloadify.swf',
downloadImage: 'images/download.png',
width: 100,
height: 30,
transparent: true,
append: false
});
</script>可以在这里找到:http://pixelgraphics.us/downloadify/test.html
提前感谢
发布于 2012-08-20 11:32:13
您可以只指定任何id。
Downloadify.create( id_or_DOM_element, options );发布于 2014-12-08 19:50:31
最好的解决方案就是像"setlio“所说的那样,将按钮图像设置为透明图像,然后在其下方放置所需的文本或图片
https://stackoverflow.com/questions/12031962
复制相似问题