仿網易126網路硬碟上傳
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>仿網易126網路硬碟上傳 by littlelam</title>
</head>
<script>
//css樣式以及部分程式碼源自126
var TotalFiles = 0;
function AddFiles()
{
TotalFiles ++;
var file=document.createElement("input");
file.type = "file";
file.id = "f"+ TotalFiles.toString();
file.name = "files"+ TotalFiles.toString();
file.hideFocus = true;
file.size = 1;
file.style.cssText = "cursor:pointer; width:1px; border:none; height:32px; padding:0px; margin:0px;position:absolute; opacity:0;filter:alpha(opacity=0);left:-32px !important;left:-5px;left/**/:-3px; font-size:20px;";
file.onchange = function ()
{
for (var i=1;i<=TotalFiles;i++)
{
if ($("f"+i.toString())&&$("f"+i.toString())!=this)
{
if ($("f"+i.toString()).value == this.value)
{
DelFile(this.id.replace("f",""));
AddFiles();
window.alert("已有相同檔案,無須重複上傳");
return;
}
}
}
$("s"+TotalFiles.toString()).innerHTML = "<table class=oplist_filelist cellSpacing=0 cellPadding=0 width="100%" border=0><tr class=tr_file><td class=td_pathlist> " + $("f"+TotalFiles.toString()).value + "</td><td class=td_operate noWrap><span οnclick="DelFile('"+TotalFiles.toString()+"')" style="cursor:pointer;color:red;font-weight:bloder;">X 移除</span></td></tr></table>";
this.style.display = "none";
AddFiles();
CheckUploadDiv();
};
$("uploadInput").appendChild(file);
var div=document.createElement("div");
div.id = "s"+ TotalFiles.toString();
$("uploadDiv").appendChild(div);
}
function DelFile(str)
{
$("uploadInput").removeChild($("f"+str));
$("uploadDiv").removeChild($("s"+str));
CheckUploadDiv();
}
function CheckUploadDiv()
{
$("divNone").style.display = $("uploadDiv").innerHTML.indexOf("移除")==-1?"":"none";
}
function DelEmpty()
{
for (var i=1;i<=TotalFiles;i++)
{
if ($("f"+i.toString()))
{
if ($("f"+i.toString()).value == "")
$("uploadInput").removeChild($("f"+i.toString()));
}
}
}
function checkForm()
{
var HaveFile = false;
for (var i=1;i<=TotalFiles;i++)
{
if ($("f"+i.toString()))
{
if ($("f"+i.toString()).value != "")
{
HaveFile = true;
break;
}
}
}
if (!HaveFile)
{
window.alert("點選“新增檔案”按鈕 新增要上傳的檔案");
return false;
}
$("submitButton").disabled = true;
DelEmpty();
return true;
}
function $(id)
{
return document.getElementById(id);
}
</script>
<style>
a.btn{background-image:url(http://mimg.163.com/netfolder/images/all_toolbar.gif);display:block; background-position:2px -32px; margin:6px 4px;float:left; border:1px solid #bebebe; cursor:pointer; position:relative;}
.addbtn{height:32px;width:100px;}
a.btn:hover{background-position:2px -64px; border:1px solid #d2d2d2; background-color:#FFFFEE;}
</style>
<body>
<FORM METHOD="post" NAME="form1" ACTION="savetofile.aspx" ENCTYPE="multipart/form-data" onSubmit="return checkForm();">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="twp_all">
<tr>
<td><div class="oplist_op_af_inner" id="buttonDiv"><a href="javascript:AddFiles();" class="btn"><div id="uploadInput" class="addbtn"></div></a>
</div>
</td>
</tr>
<tr>
<td>
<div class="twp_con_div2" id="filePanel">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="oplist_filelist">
<tr class="tbl_inner_title">
<td class="td_pathlist">檔案路徑</td>
<td nowrap class="td_operate">操作</td>
</tr>
</table>
<div id="uploadDiv"></div>
</div>
</td>
</tr>
<script>AddFiles();</script>
<tr>
<td class="wp_bottom button_bar"><input name="submit" id="submitButton" type="submit" value="開始上傳">
 
</td>
</tr>
</table>
</form>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>仿網易126網路硬碟上傳 by littlelam</title>
</head>
<script>
//css樣式以及部分程式碼源自126
var TotalFiles = 0;
function AddFiles()
{
TotalFiles ++;
var file=document.createElement("input");
file.type = "file";
file.id = "f"+ TotalFiles.toString();
file.name = "files"+ TotalFiles.toString();
file.hideFocus = true;
file.size = 1;
file.style.cssText = "cursor:pointer; width:1px; border:none; height:32px; padding:0px; margin:0px;position:absolute; opacity:0;filter:alpha(opacity=0);left:-32px !important;left:-5px;left/**/:-3px; font-size:20px;";
file.onchange = function ()
{
for (var i=1;i<=TotalFiles;i++)
{
if ($("f"+i.toString())&&$("f"+i.toString())!=this)
{
if ($("f"+i.toString()).value == this.value)
{
DelFile(this.id.replace("f",""));
AddFiles();
window.alert("已有相同檔案,無須重複上傳");
return;
}
}
}
$("s"+TotalFiles.toString()).innerHTML = "<table class=oplist_filelist cellSpacing=0 cellPadding=0 width="100%" border=0><tr class=tr_file><td class=td_pathlist> " + $("f"+TotalFiles.toString()).value + "</td><td class=td_operate noWrap><span οnclick="DelFile('"+TotalFiles.toString()+"')" style="cursor:pointer;color:red;font-weight:bloder;">X 移除</span></td></tr></table>";
this.style.display = "none";
AddFiles();
CheckUploadDiv();
};
$("uploadInput").appendChild(file);
var div=document.createElement("div");
div.id = "s"+ TotalFiles.toString();
$("uploadDiv").appendChild(div);
}
function DelFile(str)
{
$("uploadInput").removeChild($("f"+str));
$("uploadDiv").removeChild($("s"+str));
CheckUploadDiv();
}
function CheckUploadDiv()
{
$("divNone").style.display = $("uploadDiv").innerHTML.indexOf("移除")==-1?"":"none";
}
function DelEmpty()
{
for (var i=1;i<=TotalFiles;i++)
{
if ($("f"+i.toString()))
{
if ($("f"+i.toString()).value == "")
$("uploadInput").removeChild($("f"+i.toString()));
}
}
}
function checkForm()
{
var HaveFile = false;
for (var i=1;i<=TotalFiles;i++)
{
if ($("f"+i.toString()))
{
if ($("f"+i.toString()).value != "")
{
HaveFile = true;
break;
}
}
}
if (!HaveFile)
{
window.alert("點選“新增檔案”按鈕 新增要上傳的檔案");
return false;
}
$("submitButton").disabled = true;
DelEmpty();
return true;
}
function $(id)
{
return document.getElementById(id);
}
</script>
<style>
a.btn{background-image:url(http://mimg.163.com/netfolder/images/all_toolbar.gif);display:block; background-position:2px -32px; margin:6px 4px;float:left; border:1px solid #bebebe; cursor:pointer; position:relative;}
.addbtn{height:32px;width:100px;}
a.btn:hover{background-position:2px -64px; border:1px solid #d2d2d2; background-color:#FFFFEE;}
</style>
<body>
<FORM METHOD="post" NAME="form1" ACTION="savetofile.aspx" ENCTYPE="multipart/form-data" onSubmit="return checkForm();">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="twp_all">
<tr>
<td><div class="oplist_op_af_inner" id="buttonDiv"><a href="javascript:AddFiles();" class="btn"><div id="uploadInput" class="addbtn"></div></a>
</div>
</td>
</tr>
<tr>
<td>
<div class="twp_con_div2" id="filePanel">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="oplist_filelist">
<tr class="tbl_inner_title">
<td class="td_pathlist">檔案路徑</td>
<td nowrap class="td_operate">操作</td>
</tr>
</table>
<div id="uploadDiv"></div>
</div>
</td>
</tr>
<script>AddFiles();</script>
<tr>
<td class="wp_bottom button_bar"><input name="submit" id="submitButton" type="submit" value="開始上傳">
 
</td>
</tr>
</table>
</form>
</body>
</html>
相關文章
- 仿網易雲音樂webAppWebAPP
- OA系統之網路硬碟,高效管理大容量網路硬碟硬碟
- 仿網易雲音樂播放介面
- Flutter仿網易雲音樂:播放介面Flutter
- Taro小程式仿網易雲音樂
- 仿網易LOFTER視差滾動列表
- 網上1000多的高仿包
- 高仿網易雲音樂 Vue前端專案Vue前端
- SimpleMusic-網易雲音樂高仿-安卓安卓
- 探索網路安全:淺析檔案上傳漏洞
- 網傳網際網路公司大裁員
- 連線上網路無法上網
- 全新版本仿網易雲音樂來啦
- 使用jQuery仿製網易雲音樂移動端jQuery
- 初識React:仿網易公開課(react+antd)React
- 大廈將傾,網際網路將如何變革傳統行業(上)行業
- Electron+Vue實現仿網易雲音樂實戰Vue
- 網易雲易盾斬獲第二屆“凱通科技杯”網路安全技能大賽網際網路組冠軍
- 上網部署(銳捷睿易篇)
- 網易雲易盾三款產品入選2018網路安全全景圖
- 【Flutter 專題】97 仿網易新聞標籤選擇器Flutter
- HTML+CSS+JAVASCRIPT 高仿低配網頁版網易雲音樂播放器HTMLCSSJavaScript網頁播放器
- linux23-網路傳輸Linux
- Python 不寫硬碟上傳檔案Python硬碟
- 網路安全中檔案上傳漏洞是如何導致的?
- 卷積網路雖動人,膠囊網路更傳“神”卷積
- 網際網路大檔案的傳輸方式
- 易觀:2018年網際網路K12線上輔導行業分析(附下載)行業
- LRC歌詞原理和實現高仿Android網易雲音樂Android
- Android專案實戰之高仿網易雲音樂啟動介面Android
- Vue+mint-ui+flexible仿移動端App(網易雲課堂)VueUIFlexAPP
- 走向網路開放 戴爾易安信未來的網路願景
- 工業網際網路,走,上雲去!
- 議“上大學不如上網際網路”
- thinkphp仿卷皮網PHP
- 國家網路安全宣傳週 | 科普:網路安全是什麼
- 網易雲音樂網路庫跨平臺化實踐
- 利用Python網路爬蟲抓取網易雲音樂歌詞Python爬蟲