复制代码代码如下:
<!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>