<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddExtraFile.aspx.cs" Inherits="QA.CAR.WEB.CARForm.AddExtraFile" %>
添加附件
//检查类型
function CheckFileType() {
var typeArray = new Array('doc', 'png', 'gif', 'pdf', 'txt', 'html');
var filename = document.getElementById("FileUpload").value;
var checkArrray = filename.split('.');
var strExtern = checkArrray[checkArrray.length - 1];
var isFind = false;
for (var iPos = 0; iPos < typeArray.length; iPos++) if (typeArray[iPos] == strExtern) isFind = true;
if (!isFind) {
var bjFile = document.getElementById("FileUpload");
objFile.outerHTML = objFile.outerHTML.replace(/(value=\").+\"/i, "$1\"");
alert("文件類型不符合");
}
else {
if (document.getElementById("HideFileName").value != document.getElementById("FileUpload").value) {
document.getElementById("HideFileName").value = document.getElementById("FileUpload").value;
$('#Btn_Upload').removeAttr("disabled");
}
}
}
function yourfunction() {window.close();}
.file1
{
padding: 2px 0px;
display: block;
float: left;
background: #FF66CC;
color: #fff;
z-index: 1;
margin-left: 0px;
vertical-align: middle;
height: 22px;
width:60px;
cursor: pointer;
}
.line
{
position: relative;
padding: 8px 0;
top: 0px;
left: 0px;
height: 22px;
width: 60px;
cursor: pointer;
}
.line span
{
float:left;
height:22px;
width:60px;
left: 0px;
cursor: pointer;
}
.file
{
position: absolute;
float:left;
left: 0px;
top: 6px;
filter: alpha(opacity=0);
opacity: 0;
height: 30px;
cursor: pointer;
width: 55px;
}
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25897606/viewspace-705174/
,如需转载,请注明出处,否则将追究法律责任。