<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml"lang="en"xml:lang="en">
<head>
<title>Downloadify</title>
<metahttp-equiv="content-type"content="text/html;charset=utf-8">
<styletype="text/css"media="screen">
body{background:#fff;width:500px;margin:20pxauto;}
input,textarea,p{font-family:宋体,黑体;font-size:12pt;}
input,textarea{border:solid1px#aaa;padding:4px;width:98%;}
</style>
<scripttype="text/javascript"src="js/swfobject.js"></script>
<scripttype="text/javascript"src="js/downloadify.js"></script>
<!--<scripttype="text/javascript"src="js/downloadify.min.js"></script>-->
<scripttype="text/javascript">
window.load=function(){
Downloadify.create('downloadify',{
filename:function(){
returndocument.getElementById('filename').value;
},
data:function(){
returndocument.getElementById('data').value;
},
onComplete:function(){alert('成功保存文件!');},
onCancel:function(){alert('您已经取消保存文件');},
onError:function(){alert('出现错误了');},
swf:'js/downloadify.swf',
downloadImage:'js/download.png',
width:100,
height:30,
transparent:true,
append:false
});
}
</script>
</head>
<bodyonload="load();">
<inputtype="text"name="filename"value="文件名.txt"id="filename"/><br/>
<textareacols="60"rows="10"name="data"id="data">文件内容</textarea>
<pid="downloadify">YoumusthaveFlash10installedtodownloadthisfile.</p>
</body>
</html>
|