使用する代わりに、自分のボタンをdownloadifylibに接続する方法を知っている人はいますか?
<div id="downloadify"></div>
これを他のボタンや要素に割り当てたいのですが。だから私はそれが持っているカスタムボタンの使用を避けることができます。
libページのデモは次のとおりです。
<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
前もって感謝します