复制代码代码如下:
<! 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">
<adal>
<Title> Téléchargement </TITME>
<meta http-equiv = "contenu-type" contenu = "text / html; charset = utf-8">
<style type = "Text / CSS" Media = "Screen">
Body {Background: #fff; Largeur: 500px; marge: 20px auto;}
Entrée, TextArea, P {Font-Family: 宋体, 黑体; taille de police: 12pt;}
entrée, textarea {border: solide 1px #aaa; rembourrage: 4px; Largeur: 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 () {
Downlowify.create ('downloadify', {{
nom de fichier: fonction () {
return document.getElementById ('FileName'). Valeur;
},
data: function () {
return document.getElementById ('data'). valeur;
},
onComplete: function () {alert ('成功保存文件!'); },
oncancel: function () {alert ('您已经取消保存文件'); },
onError: function () {alert ('出现错误了'); },
SWF: 'JS / Downloadify.swf',
téléchargement: «js / téléchargement.png»,
Largeur: 100,
hauteur: 30,
transparent: vrai,
Ajouter: faux
});
}
</cript>
</ head>
<body onload = "load ();">
<input type = "text" name = "filename" value = "文件名 .txt" id = "filename" /> <br />
<textarea cols = "60" rows = "10" name = "data" id = "data"> 文件内容 </ textarea>
<p id = "downloadify"> Vous devez avoir installé Flash 10 pour télécharger ce fichier. </p>
</docy>
</html>