zoukankan      html  css  js  c++  java
  • 关于附件控件隐藏后,在IE下不能上传,报“拒绝访问”

    报错时的使用:

    @Html.TextBoxFor(m => m.FileName, new { style = "457px;", @readonly = "readonly" })
    <button class="btn" type="button" onclick="$('#attachFile').click()"><span class="fa fa-folder"></span>选择</button>
    <input id="attachFile" onchange="attachFileChange()" type="file" name="attachFile" style="display:none;" />

    修改后的使用:

    @Html.TextBoxFor(m => m.FileName, new { style = "457px;", @readonly = "readonly" })
    <button class="btn" style="" type="button"><span class="fa fa-folder"></span>选择</button>
    <input id="attachFile" style="position:absolute;left:0px;top:0;520px;height:100%;z-index:999;opacity:0;filter:alpha(opacity=0);-moz-opacity:0;-kh tml-opacity:0;" onchange="attachFileChange();" type="file" name="attachFile" />

    修改后测试通过

  • 相关阅读:
    1070 结绳
    1069 微博转发抽奖
    1068 万绿丛中一点红
    1067 试密码
    1066 图像过滤
    1065 单身狗
    CSS--文本溢出与换行
    css--滤镜filter
    css--flex布局
    css--table布局
  • 原文地址:https://www.cnblogs.com/kimi-gyj/p/4503330.html
Copyright © 2011-2022 走看看