复制代码代码如下 :
<! doctype html public "-// w3c // dtd xhtml 1.0 엄격한 // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-srtrict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml"lang = "en"xml : lang = "en">
<헤드>
<title> 다운로드 </title>
<meta http-equiv = "content-type"content = "text/html; charset = utf-8">
<스타일 유형 = "text/css"media = "screen">
신체 {배경 : #fff; 너비 : 500px; 여백 : 20px Auto;}
입력, Textarea, p {font-family : 宋体, 黑体; 글꼴 크기 : 12pt;}
입력, TextArea {Border : Solid 1PX #AAA; 패딩 : 4px; 너비 : 98%;}
</스타일>
<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', {
filename : function () {
return document.getElementById ( 'filename'). 값;
},
데이터 : function () {
return document.getElementById ( 'data'). 값;
},
oncomplete : function () {alert ( '成功保存文件!'); },
oncancel : function () {alert ( '您已经取消保存文件'); },
onerror : function () {alert ( '出现错误了'); },
SWF : 'js/downloadify.swf',
DownloadImage : 'js/download.png',
너비 : 100,
높이 : 30,
투명 : 사실,
추가 : 거짓
});
}
</스크립트>
</head>
<body onload = "load ();">
<입력 유형 = "text"name = "filename"value = "文件名 .txt"id = "filename" /> <br />
<textArea cols = "60"rows = "10"name = "data"id = "data"> 文件内容 </textRea>
<p id = "downloadify">이 파일을 다운로드하려면 플래시 10을 설치해야합니다. </p>
</body>
</html>