ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 文件上传按钮样式

文件上传按钮样式

原创 Linux操作系统 作者:ForTechnology 时间:2011-08-17 17:05:43 0 删除 编辑
<%@ 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;
        }
   




   
   

       

           
               
               
           

       

       

           
                           nClick="Btn_Upload_Click"   />
           
       

       

           

   

   
   


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25897606/viewspace-705174/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 虚拟目录定位
下一篇: HttpApplication
请登录后发表评论 登录
全部评论

注册时间:2011-07-21

  • 博文量
    220
  • 访问量
    667508