在Asp.net页面中隐藏上传文件的域

发表时间:2007-4-5 9:13:00

<html>
<head>
<style>
a.addfile {
        background-image:url(../images/upload.GIF);
        background-repeat:no-repeat;
        background-position:0px 6px;
        display:block;
        float:left;
        height:22px;
        margin-top:0px;
        margin-left:0px;
        position:relative;
        text-decoration:none;
        top:3px;
        80px;
    }

    input.addfile {
        /**//*left:-18px;*/
    }

    input.addfile {
        cursor:pointer !important;
        height:18px;
        left:-13px;
        filter:alpha(opacity=0);
        position:absolute;
        top:5px;
        1px;
        z-index:-1;
    }
</style>
</head>
<body>
<form>
<a href="http://www.blog.com.cn/javascript:void(0)" class="addfile" id="anchorUpload" runat="server">                    
  <input id="upload" runat="server" class="addfile" type="file" size="1" />
</a>
</form>
</body>
</html>

原文地址:https://www.cnblogs.com/yuanxiaoping_21cn_com/p/1332948.html