zoukankan      html  css  js  c++  java
  • 更改<input type=file />的样式

    <!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=utf-8" />
    <style type="text/css">
    body{ font-size:14px;}
    .FileBox input{ vertical-align:middle; margin:0; padding:0}
    .FileBox{ position:relative;width:340px}
    .FileBox .txt{ height:22px; border:1px solid #cdcdcd; width:180px;}
    .FileBox .btn{ background-color:#FFF; border:1px solid #CDCDCD;height:24px; width:70px;}
    .FileBox .file{ position:absolute; top:0; right:80px; height:24px; filter:alpha(opacity:0);opacity: 0;width:260px }
    </style>
    <title>无标题文档</title>
    </head>
    
    <body>
    <div class="FileBox">
      <form action="" method="post" enctype="multipart/form-data">
        <input type='text' name='textfield' id='textfield' class='txt' />  
        <input type='button' class='btn' value='浏览...' />
        <input type="file" name="fileField" class="file" id="fileField" size="28" onchange="document.getElementById('textfield').value=this.value" />
        <input type="submit" name="submit" class="btn" value="上传" />
      </form>
    </div>
    </body>
    </html>
  • 相关阅读:
    MSSQL 事务说明
    创业课堂之团队
    如何开发HTML编辑器
    IE和Firefox对Documnet,iframe的处理
    jQuery控制iFrame
    如何更高效的制作可通用的HTML页面
    天下武功,无坚不破,唯快不破
    Flash本地通讯
    播放本地MP3 (二)
    播放本地MP3 (一)
  • 原文地址:https://www.cnblogs.com/hyql/p/5473154.html
Copyright © 2011-2022 走看看