复制代码代码如下::
<! DocType html public "-// w3c // dtd xhtml 1.0 strict // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml" Lang = "en" xml: Lang = "en">
<kopf>
<title> downloadify </title>
<meta http-äquiv = "content-type" content = "text/html; charset = utf-8">
<style type = "text/css" media = "screen">
Körper {Hintergrund: #fff; Breite: 500px; Rand: 20px Auto;}
Eingabe, textarea, p {Schriftfamilie: 宋体, 黑体; Schriftgröße: 12pt;}
Eingabe, textarea {Border: Solid 1px #aaa; Polsterung: 4px; Breite: 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">
Fenster.load = function () {
Downloadify.create ('downloadify', {
Dateiname: function () {
return document.getElementById ('Dateiname'). Wert;
},
Daten: function () {
return document.getElementById ('Daten'). Wert;
},
onComplete: function () {alert ('成功保存文件!'); },
OnCancel: function () {alert ('您已经取消保存文件'); },
OnError: function () {alert ('出现错误了'); },
SWF: 'JS/downloadify.swf',
DownloadImage: 'js/download.png',
Breite: 100,
Höhe: 30,
transparent: wahr,
Anhängen: Falsch
});
}
</script>
</head>
<body onload = "load ();">
<Eingabe type = "text" name = "Dateiname" value = "文件名 .txt" id = "Dateiname" /> <br />
<textarea cols = "60" rows = "10" name = "data" id = "data"> 文件内容 </textArea>
<p id = "downloadify"> Sie müssen Flash 10 installiert haben, um diese Datei herunterzuladen. </p>
</body>
</html>