複製代碼代碼如下:
<!Doctype html公共” - // W3C // DTD XHTML 1.0 strict // en”“” http://www.w.org/tr/xhtml1/dtd/xhtml1/xhtml1-strict.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”>
<style type =“ text/css”媒體=“屏幕”>
身體{背景:#fff;寬度:500px;保證金:20px auto;}
輸入,textarea,p {font-formy:宋體,黑體;字體大小:12pt;}
輸入,textarea {border:實心1px #aaa;填充:4px;寬度:98%;}
</style>
<script type =“ text/javascript” src =“ js/swfobject.js”> </script>
<script type =“ text/javascript” src =“ js/downloadify.js”> </script>
態
<腳本類型=“ text/javascript”>
window.load = function(){
downloadify.create('downloadify',{
文件名:function(){
返回document.getElementById('filename')。值;
},,
數據:function(){
返回document.getElementById('data')。值;
},,
oncomplete:function(){alert('成功保存文件!'); },,
oncancel:function(){alert('您已經取消保存文件'); },,
OnError:function(){alert('出現錯誤了'); },,
SWF:'JS/downloadify.swf',
下載圖:'JS/download.png',
寬度:100,
身高:30,
透明:是的,
附加:false
});
}
</script>
</head>
<body onload =“ load();”>
<input type =“ text” name =“ filename” value =“ .txt” id =“ filename” /> <br />
<textarea cols =“ 60”行=“ 10” name =“ data” id =“ data”>文件內容</textarea>
<p id =“ downloadify”>您必須安裝閃存10才能下載此文件。</p>
</body>
</html>