upload.html
 <!DOCTYPE html>
<html lang="en">
<head>
<script type='text/javascript' src='swfupload.js'></script>
<link href="default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/fileprogress.js"></script>
<script type="text/javascript" src="js/handlers.js"></script>
</head>
<body>
<div id="divSWFUploadUI" style="margin-top: 20px;">
<div class="fieldset flash" id="fsUploadProgress">
<span class="legend">Upload Queue</span>
</div>
<div id="SWFUploads">
<p>
<span id="SWFUpload"></span>
<input id="btnCancel" type="button" value="Cancel All Uploads" disabled="disabled" style="margin-left: 2px; height: 22px; font-size: 8pt;" />
<br />
</p>
</div>
<div>
<div id="divLoadingContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
SWFUpload is loading. Please wait a moment...
</div>
<div id="divLongLoading" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
SWFUpload is taking a long time to load or the load has failed. Please make sure that the Flash Plugin is enabled and that a working version of the Adobe Flash Player is installed.
</div>
<div id="divAlternateContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
We're sorry. SWFUpload could not load. You may need to install or upgrade Flash Player.
Visit the <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Adobe website</a> to get the Flash Player.
</div> <script type='text/javascript'>
var swf;
var settings={
upload_url:'upload.php',
flash_url : "swfupload.swf",
post_params: {
"PHPSESSID" : "NONE",
"HELLO-WORLD" : "Here I Am",
".what" : "OKAY"
},
file_size_limit : "1000 MB",
file_types : "*.mp4",
file_upload_limit : ,
file_queue_limit : ,
custom_settings : {
progressTarget : "fsUploadProgress",
cancelButtonId : "btnCancel"
},
debug: false, // Button Settings
button_image_url : "XPButtonUploadText_61x22.png",
button_placeholder_id : "SWFUpload",
button_width: ,
button_height: , // The event handler functions are defined in handlers.js
swfupload_preload_handler : swfUploadPreLoad,
swfupload_load_failed_handler : swfUploadLoadFailed,
swfupload_loaded_handler : swfUploadLoaded,
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_start_handler : uploadStart,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
queue_complete_handler : queueComplete // Queue plugin event }; swf= new SWFUpload (settings);
</script>
</body>
</html>

upload.html



upload.php
 <?php
if(!is_dir("./files")) mkdir("./files", );
move_uploaded_file($_FILES['Filedata']['tmp_name'], "./files/".$_FILES['Filedata']['name']);
handler.js
 /* Demo Note:  This demo uses a FileProgress class that handles the UI for displaying the file name and percent complete.
The FileProgress class is not part of SWFUpload.
*/ /* **********************
Event Handlers
These are my custom event handlers to make my
web application behave the way I went when SWFUpload
completes different tasks. These aren't part of the SWFUpload
package. They are part of my application. Without these none
of the actions SWFUpload makes will show up in my application.
********************** */ function swfUploadPreLoad() {
var self = this;
var loading = function () {
//document.getElementById("divSWFUploadUI").style.display = "none";
document.getElementById("divLoadingContent").style.display = ""; var longLoad = function () {
document.getElementById("divLoadingContent").style.display = "none";
document.getElementById("divLongLoading").style.display = "";
};
this.customSettings.loadingTimeout = setTimeout(function () {
longLoad.call(self)
},
*
);
}; this.customSettings.loadingTimeout = setTimeout(function () {
loading.call(self);
},
*
);
}
function swfUploadLoaded() {
var self = this;
clearTimeout(this.customSettings.loadingTimeout);
//document.getElementById("divSWFUploadUI").style.visibility = "visible";
//document.getElementById("divSWFUploadUI").style.display = "block";
document.getElementById("divLoadingContent").style.display = "none";
document.getElementById("divLongLoading").style.display = "none";
document.getElementById("divAlternateContent").style.display = "none"; //document.getElementById("btnBrowse").onclick = function () { self.selectFiles(); };
document.getElementById("btnCancel").onclick = function () { self.cancelQueue(); };
} function swfUploadLoadFailed() {
clearTimeout(this.customSettings.loadingTimeout);
//document.getElementById("divSWFUploadUI").style.display = "none";
document.getElementById("divLoadingContent").style.display = "none";
document.getElementById("divLongLoading").style.display = "none";
document.getElementById("divAlternateContent").style.display = "";
} function fileQueued(file) {
try {
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setStatus("Pending...");
progress.toggleCancel(true, this); } catch (ex) {
this.debug(ex);
} } function fileQueueError(file, errorCode, message) {
try {
if (errorCode === SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) {
alert("You have attempted to queue too many files.\n" + (message === ? "You have reached the upload limit." : "You may select " + (message > ? "up to " + message + " files." : "one file.")));
return;
} var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setError();
progress.toggleCancel(false); switch (errorCode) {
case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
progress.setStatus("File is too big.");
this.debug("Error Code: File too big, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
progress.setStatus("Cannot upload Zero Byte files.");
this.debug("Error Code: Zero byte file, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:
progress.setStatus("Invalid File Type.");
this.debug("Error Code: Invalid File Type, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
default:
if (file !== null) {
progress.setStatus("Unhandled Error");
}
this.debug("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
}
} catch (ex) {
this.debug(ex);
}
} function fileDialogComplete(numFilesSelected, numFilesQueued) {
try {
if (numFilesSelected > ) {
document.getElementById(this.customSettings.cancelButtonId).disabled = false;
} /* I want auto start the upload and I can do that here */
this.startUpload();
} catch (ex) {
this.debug(ex);
}
} function uploadStart(file) {
try {
/* I don't want to do any file validation or anything, I'll just update the UI and
return true to indicate that the upload should start.
It's important to update the UI here because in Linux no uploadProgress events are called. The best
we can do is say we are uploading.
*/
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setStatus("Uploading...");
progress.toggleCancel(true, this);
}
catch (ex) {} return true;
} function uploadProgress(file, bytesLoaded, bytesTotal) {
try {
var percent = Math.ceil((bytesLoaded / bytesTotal) * ); var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setProgress(percent);
progress.setStatus("Uploading...");
} catch (ex) {
this.debug(ex);
}
} function uploadSuccess(file, serverData) {
try {
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setComplete();
progress.setStatus("Complete.");
progress.toggleCancel(false); } catch (ex) {
this.debug(ex);
}
} function uploadError(file, errorCode, message) {
try {
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setError();
progress.toggleCancel(false); switch (errorCode) {
case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
progress.setStatus("Upload Error: " + message);
this.debug("Error Code: HTTP Error, File name: " + file.name + ", Message: " + message);
break;
case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:
progress.setStatus("Upload Failed.");
this.debug("Error Code: Upload Failed, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
case SWFUpload.UPLOAD_ERROR.IO_ERROR:
progress.setStatus("Server (IO) Error");
this.debug("Error Code: IO Error, File name: " + file.name + ", Message: " + message);
break;
case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:
progress.setStatus("Security Error");
this.debug("Error Code: Security Error, File name: " + file.name + ", Message: " + message);
break;
case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
progress.setStatus("Upload limit exceeded.");
this.debug("Error Code: Upload Limit Exceeded, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:
progress.setStatus("Failed Validation. Upload skipped.");
this.debug("Error Code: File Validation Failed, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
// If there aren't any files left (they were all cancelled) disable the cancel button
if (this.getStats().files_queued === ) {
document.getElementById(this.customSettings.cancelButtonId).disabled = true;
}
progress.setStatus("Cancelled");
progress.setCancelled();
break;
case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
progress.setStatus("Stopped");
break;
default:
progress.setStatus("Unhandled Error: " + errorCode);
this.debug("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
}
} catch (ex) {
this.debug(ex);
}
} function uploadComplete(file) {
if (this.getStats().files_queued === ) {
document.getElementById(this.customSettings.cancelButtonId).disabled = true;
}
} // This event comes from the Queue Plugin
function queueComplete(numFilesUploaded) {
var status = document.getElementById("divStatus");
status.innerHTML = numFilesUploaded + " file" + (numFilesUploaded === ? "" : "s") + " uploaded.";
}

handler.js


jsProgress.js
 /*
A simple class for displaying file information and progress
Note: This is a demonstration only and not part of SWFUpload.
Note: Some have had problems adapting this class in IE7. It may not be suitable for your application.
*/ // Constructor
// file is a SWFUpload file object
// targetID is the HTML element id attribute that the FileProgress HTML structure will be added to.
// Instantiating a new FileProgress object with an existing file will reuse/update the existing DOM elements
function FileProgress(file, targetID) {
this.fileProgressID = file.id; this.opacity = ;
this.height = ; this.fileProgressWrapper = document.getElementById(this.fileProgressID);
if (!this.fileProgressWrapper) {
this.fileProgressWrapper = document.createElement("div");
this.fileProgressWrapper.className = "progressWrapper";
this.fileProgressWrapper.id = this.fileProgressID; this.fileProgressElement = document.createElement("div");
this.fileProgressElement.className = "progressContainer"; var progressCancel = document.createElement("a");
progressCancel.className = "progressCancel";
progressCancel.href = "#";
progressCancel.style.visibility = "hidden";
progressCancel.appendChild(document.createTextNode(" ")); var progressText = document.createElement("div");
progressText.className = "progressName";
progressText.appendChild(document.createTextNode(file.name)); var progressBar = document.createElement("div");
progressBar.className = "progressBarInProgress"; var progressStatus = document.createElement("div");
progressStatus.className = "progressBarStatus";
progressStatus.innerHTML = "&nbsp;"; this.fileProgressElement.appendChild(progressCancel);
this.fileProgressElement.appendChild(progressText);
this.fileProgressElement.appendChild(progressStatus);
this.fileProgressElement.appendChild(progressBar); this.fileProgressWrapper.appendChild(this.fileProgressElement); document.getElementById(targetID).appendChild(this.fileProgressWrapper);
} else {
this.fileProgressElement = this.fileProgressWrapper.firstChild;
this.reset();
} this.height = this.fileProgressWrapper.offsetHeight;
this.setTimer(null); } FileProgress.prototype.setTimer = function (timer) {
this.fileProgressElement["FP_TIMER"] = timer;
};
FileProgress.prototype.getTimer = function (timer) {
return this.fileProgressElement["FP_TIMER"] || null;
}; FileProgress.prototype.reset = function () {
this.fileProgressElement.className = "progressContainer"; this.fileProgressElement.childNodes[].innerHTML = "&nbsp;";
this.fileProgressElement.childNodes[].className = "progressBarStatus"; this.fileProgressElement.childNodes[].className = "progressBarInProgress";
this.fileProgressElement.childNodes[].style.width = "0%"; this.appear();
}; FileProgress.prototype.setProgress = function (percentage) {
this.fileProgressElement.className = "progressContainer green";
this.fileProgressElement.childNodes[].className = "progressBarInProgress";
this.fileProgressElement.childNodes[].style.width = percentage + "%"; this.appear();
};
FileProgress.prototype.setComplete = function () {
this.fileProgressElement.className = "progressContainer blue";
this.fileProgressElement.childNodes[].className = "progressBarComplete";
this.fileProgressElement.childNodes[].style.width = ""; var oSelf = this;
this.setTimer(setTimeout(function () {
oSelf.disappear();
}, ));
};
FileProgress.prototype.setError = function () {
this.fileProgressElement.className = "progressContainer red";
this.fileProgressElement.childNodes[].className = "progressBarError";
this.fileProgressElement.childNodes[].style.width = ""; var oSelf = this;
this.setTimer(setTimeout(function () {
oSelf.disappear();
}, ));
};
FileProgress.prototype.setCancelled = function () {
this.fileProgressElement.className = "progressContainer";
this.fileProgressElement.childNodes[].className = "progressBarError";
this.fileProgressElement.childNodes[].style.width = ""; var oSelf = this;
this.setTimer(setTimeout(function () {
oSelf.disappear();
}, ));
};
FileProgress.prototype.setStatus = function (status) {
this.fileProgressElement.childNodes[].innerHTML = status;
}; // Show/Hide the cancel button
FileProgress.prototype.toggleCancel = function (show, swfUploadInstance) {
this.fileProgressElement.childNodes[].style.visibility = show ? "visible" : "hidden";
if (swfUploadInstance) {
var fileID = this.fileProgressID;
this.fileProgressElement.childNodes[].onclick = function () {
swfUploadInstance.cancelUpload(fileID);
return false;
};
}
}; FileProgress.prototype.appear = function () {
if (this.getTimer() !== null) {
clearTimeout(this.getTimer());
this.setTimer(null);
} if (this.fileProgressWrapper.filters) {
try {
this.fileProgressWrapper.filters.item("DXImageTransform.Microsoft.Alpha").opacity = ;
} catch (e) {
// If it is not set initially, the browser will throw an error. This will set it if it is not set yet.
this.fileProgressWrapper.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=100)";
}
} else {
this.fileProgressWrapper.style.opacity = ;
} this.fileProgressWrapper.style.height = ""; this.height = this.fileProgressWrapper.offsetHeight;
this.opacity = ;
this.fileProgressWrapper.style.display = ""; }; // Fades out and clips away the FileProgress box.
FileProgress.prototype.disappear = function () { var reduceOpacityBy = ;
var reduceHeightBy = ;
var rate = ; // 15 fps if (this.opacity > ) {
this.opacity -= reduceOpacityBy;
if (this.opacity < ) {
this.opacity = ;
} if (this.fileProgressWrapper.filters) {
try {
this.fileProgressWrapper.filters.item("DXImageTransform.Microsoft.Alpha").opacity = this.opacity;
} catch (e) {
// If it is not set initially, the browser will throw an error. This will set it if it is not set yet.
this.fileProgressWrapper.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + this.opacity + ")";
}
} else {
this.fileProgressWrapper.style.opacity = this.opacity / ;
}
} if (this.height > ) {
this.height -= reduceHeightBy;
if (this.height < ) {
this.height = ;
} this.fileProgressWrapper.style.height = this.height + "px";
} if (this.height > || this.opacity > ) {
var oSelf = this;
this.setTimer(setTimeout(function () {
oSelf.disappear();
}, rate));
} else {
this.fileProgressWrapper.style.display = "none";
this.setTimer(null);
}
};

jsProgress.js



defalut.css
 /* -----------------------------------------------
www.swfupload.org
Description: Common Screen Stylesheet for SWFUpload Demos
Updated on: May 1, 2008
----------------------------------------------- */ /* -----------------------------------------------
GLOBAL RESET
----------------------------------------------- */ html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: ;
padding: ;
border: ;
outline: ;
font-weight: inherit;
font-style: inherit;
font-size: %;
font-family: inherit;
vertical-align: baseline;
} /* remember to define focus styles! */
:focus { outline: ; }
body {
line-height: ;
color: black;
background: white;
}
ol, ul {
list-style: none;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: separate;
border-spacing: ;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
} /* -----------------------------------------------
BASIC ELEMENTS
----------------------------------------------- */ /* -- Text Styles ------------------------------- */
html,
body {
margin: ;
padding: ;
width: %;
font: 12px/.4em Helvetica, Arial, sans-serif;
} a {
color: #385ea2;
text-decoration: none;
}
a:hover { text-decoration: underline; } strong { font-weight: ; } h1 {
font: 28px/1em Arial, Helvetica, sans-serif;
padding: 60px 20px 20px;
margin-bottom: 15px;
color: #;
text-decoration: none;
} h1 a{
color: #fff;
text-decoration: none;
} h2 {
font-size: 22px;
font-weight: ;
padding-top: 1em;
padding-bottom: .25em;
} p {
margin-top: .25em;
margin-bottom: .5em;
} ul { padding: 4px 5px; }
ul li {
padding: 4px 5px;
margin: 20px;
list-style:square;
} code {
display: block;
background:#edffb8 none repeat scroll %;
border-color:#b2da3a;
border-style:solid;
border-width:1px ;
font-size: 1em;
margin: 1em 0pt;
overflow:auto;
padding: .3em .4em;
white-space:pre;
} /* -- Layout ------------------------------- */ #header {
background: # url(../images/header-bg.jpg) repeat-x top left;
height: 125px;
position: relative;
}
#logo {
padding: ;
margin: ;
background: url(../images/logo.gif) no-repeat 20px 20px;
height: 106px;
width: 272px;
text-indent: -5000px;
overflow: hidden;
}
/* hide link text */
#logo a {
display: block;
color: #fff;
text-indent: -5000px;
overflow: hidden;
height: 106px;
width: 272px;
} #version {
color: #fff;
position: absolute;
right: 20px;
top: 85px;
} #content { width: 680px;}
#content { margin: 20px 90px; } /* -- Form Styles ------------------------------- */
form {
margin: ;
padding: ;
} div.fieldset {
border: 1px solid #afe14c;
margin: 10px ;
padding: 20px 10px;
}
div.fieldset span.legend {
position: relative;
background-color: #FFF;
padding: 3px;
top: -30px;
font: 14px Arial, Helvetica, sans-serif;
color: #73b304;
} div.flash {
width: 375px;
margin: 10px 5px;
border-color: #D9E4FF; -moz-border-radius-topleft : 5px;
-webkit-border-top-left-radius : 5px;
-moz-border-radius-topright : 5px;
-webkit-border-top-right-radius : 5px;
-moz-border-radius-bottomleft : 5px;
-webkit-border-bottom-left-radius : 5px;
-moz-border-radius-bottomright : 5px;
-webkit-border-bottom-right-radius : 5px; } button,
input,
select,
textarea {
border-width: 1px;
margin-bottom: 10px;
padding: 2px 3px;
} input[disabled]{ border: 1px solid #ccc } /* FF 2 Fix */ label {
width: 150px;
text-align: right;
display:block;
margin-right: 5px;
} #btnSubmit { margin: 155px ; } /* -- Table Styles ------------------------------- */
td {
font: 10pt Helvetica, Arial, sans-serif;
vertical-align: top;
} .progressWrapper {
width: 357px;
overflow: hidden;
} .progressContainer {
margin: 5px;
padding: 4px;
border: solid 1px #E8E8E8;
background-color: #F7F7F7;
overflow: hidden;
}
/* Message */
.message {
margin: 1em ;
padding: 10px 20px;
border: solid 1px #FFDD99;
background-color: #FFFFCC;
overflow: hidden;
}
/* Error */
.red {
border: solid 1px #B50000;
background-color: #FFEBEB;
} /* Current */
.green {
border: solid 1px #DDF0DD;
background-color: #EBFFEB;
} /* Complete */
.blue {
border: solid 1px #CEE2F2;
background-color: #F0F5FF;
} .progressName {
font-size: 8pt;
font-weight: ;
color: #;
width: 323px;
height: 14px;
text-align: left;
white-space: nowrap;
overflow: hidden;
} .progressBarInProgress,
.progressBarComplete,
.progressBarError {
font-size: ;
width: %;
height: 2px;
background-color: blue;
margin-top: 2px;
} .progressBarComplete {
width: %;
background-color: green;
visibility: hidden;
} .progressBarError {
width: %;
background-color: red;
visibility: hidden;
} .progressBarStatus {
margin-top: 2px;
width: 337px;
font-size: 7pt;
font-family: Arial;
text-align: left;
white-space: nowrap;
} a.progressCancel {
font-size: ;
display: block;
height: 14px;
width: 14px;
background-image: url(../images/cancelbutton.gif);
background-repeat: no-repeat;
background-position: -14px 0px;
float: right;
} a.progressCancel:hover {
background-position: 0px 0px;
} /* -- SWFUpload Object Styles ------------------------------- */
.swfupload {
vertical-align: top;
}

default.css



swfupload 例子的更多相关文章

  1. 用SWFUpload上传图片小例子

    在开发项目中,经常会用到上传图片,接下来我就用一种简单的方式给大家分享一下使用SWFUpload的方式上传图片. 1.在网站根目录下新建一个SWFUpload文件夹,把下载的组建放在SWFUpload ...

  2. SWFUpload简介及中文参考手册(share)

    SWFUpload SWFUpload 版本 2 概览 (Overview) 入门( Getting Started) js对象 (SWFUpload JavaScript Object) 构造器(C ...

  3. swfupload提示“错误302”的解决方法

    1.关于图片上传控件,flash控件的显示效果要好一些,本人使用swfupload 2.swfupload上传控件使用方式详见文档 http://www.leeon.me/upload/other/s ...

  4. SWFUpload 2.5.0版 官方说明文档 中文翻译版

    原文地址:http://www.cnblogs.com/youring2/archive/2012/07/13/2590010.html#setFileUploadLimit SWFUpload v2 ...

  5. 文件上传利器SWFUpload入门简易教程

    凡做过网站开发的都应该知道表单file的确鸡肋. Ajax解决了不刷新页面提交表单,但是却没有解决文件上传不刷新页面,当然也有其它技术让不刷新页面而提交文件,该技术主要是利用隐藏的iFrame, 较A ...

  6. swfupload使用说明

    网上的例子介绍的文档真的很多.下面简单介绍一下 SWFUpload的文件上传流程是这样的: 1.引入相应的js文件 2.实例化SWFUpload对象,传入一个配置参数对象进行各方面的配置. 3.点击S ...

  7. swfupload操作手册

    SWFUpload SWFUpload 最初是Vinterwebb.se 开发的客户端文件上传工具.它联合javascript和flash,在浏览器中提供一个优于传统上传标签 <input ty ...

  8. 文件上传工具swfupload[转]

    转至:http://zhangqgc.iteye.com/blog/906419 文件上传工具swfupload 示例: 1.JavaScript设置SWFUpload部分(与官方例子类似): var ...

  9. SWFUpload(转载)

    网上的例子介绍的文档真的很多.下面简单介绍一下 SWFUpload的文件上传流程是这样的: 1.引入相应的js文件 2.实例化SWFUpload对象,传入一个配置参数对象进行各方面的配置. 3.点击S ...

随机推荐

  1. Jquery常用radio取值,checkbox取值,select取值,radio选中,checkbox选中,select选中,及其相关设置

    获取一组radio被选中项的值:var item = $('input[name=items][checked]').val(); 获取select被选中项的文本:var item = $(" ...

  2. AngularJS四大特性

    Google AnguarJS是一个JS框架,适用于以数据的CRUD操作为主的SPA应用. 四大特性: (1)MVC模型 Model:模型,即数据=>JS中的变量 View:视图,即数据的呈现= ...

  3. firefox的console log功能

    http://www.ruanyifeng.com/blog/2011/03/firebug_console_tutorial.html Firebug是网页开发的利器,能够极大地提升工作效率. 但是 ...

  4. Unity加载模块深度解析(纹理篇)

    在游戏和VR项目的研发过程中,加载模块所带来的效率开销和内存占用(即“加载效率”.“场景切换速度”等)经常是开发团队非常头疼的问题,它不仅包括资源的加载耗时,同时也包含场景物件的实例化和资源卸载等.在 ...

  5. JAVA SSH 框架介绍

    SSH 为 struts+spring+hibernate 的一个集成框架,是目前较流行的一种JAVA Web应用程序开源框架. Struts Struts是一个基于Sun J2EE平台的MVC框架, ...

  6. 通过挂载系统光盘搭建本地yum仓库

    1,配置本地yum源: 把系统光盘挂载到文件夹aaa(aaa为自己创建的文件夹). [root@localhost /]# mount dev/cdrom /aaa 2,修改yum配置文件: yum的 ...

  7. (转)Java中的static关键字解析

    转自http://www.cnblogs.com/dolphin0520/p/3799052.html 一.static关键字的用途 在<Java编程思想>P86页有这样一段话: “sta ...

  8. 在 Mac OS X 上创建的 .NET 命令行程序访问数据库 (使用Entity Framework 7 )

    var appInsights=window.appInsights||function(config){ function r(config){t[config]=function(){var i= ...

  9. 解决Chrome重启后插件被禁用的问题

      下载组策略模版,添加白名单 http://pan.baidu.com/s/1o88kcZo 打开组策略 win+r 打开运行,输入 gpedit.msc 添加模版 右键 ->管理模版 -&g ...

  10. 利用yum下载软件包的三种方法

    转自:http://297020555.blog.51cto.com/1396304/530703 方法一: downloadonly插件 有一个yum的插件叫做downloadonly,顾名思义,就 ...