复制代码代码如下:
<! Doctype html public "-// w3c // dtd xhtml 1.0 strict // pt" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml" lang = "en" xml: lang = "en">
<head>
<title> Downloadify </ititle>
<meta http-equiv = "content-type" content = "text/html; charset = utf-8">
<style type = "text/css" Media = "Screen">
corpo {background: #fff; Largura: 500px; Margem: 20px automático;}
entrada, textarea, p {font-family: 宋体, 黑体; Size da fonte: 12pt;}
entrada, textarea {borda: sólido 1px #aaa; preenchimento: 4px; Largura: 98%;}
</style>
<script type = "text/javascript" src = "js/swfobject.js"> </script>
<script type = "text/javascript" src = "js/downloadify.js"> </script>
<!-<script type = "text/javascript" src = "js/downloadify.min.js"> </script>->
<script type = "text/javascript">
window.load = function () {
Downloadify.Create ('Downloadify', {
nome do arquivo: function () {
retorno document.getElementById ('nome do arquivo').
},
Dados: function () {
retornar document.getElementById ('dados').
},
oncomplete: function () {alert ('成功保存文件!'); },
ONCANCEL: function () {alert ('您已经取消保存文件'); },
OnError: function () {alert ('出现错误了'); },
SWF: 'js/downloadify.swf',
DownloadImage: 'js/download.png',
Largura: 100,
Altura: 30,
transparente: verdadeiro,
Anexar: Falso
});
}
</script>
</head>
<corpo onload = "load ();">
<input type = "text" name = "filename" value = "文件名 .txt" id = "nome do arquivo" /> <r />
<texttarea cols = "60" linhas = "10" name = "dados" id = "dados"> 文件内容 </sexttarea>
<P ID = "Downloadify"> Você deve ter Flash 10 instalado para baixar este arquivo. </p>
</body>
</html>