mginobili 发表于 2013-2-7 19:06:02

input file style

<head>    <style>      #excelfile      {            position:absolute;            width:30px;            height:30px;            filter:alpha(opacity=0)      }      input.button         {            border: none;            background-image: url( ../images/button_orange.gif );            width: 82px;            cursor: hand;            height: 20px;            background-color: #FFBD10;            text-align: center;            color:white;      }    </style> </head> <body> <fieldset style="width:760px">    <legend>      Upload LHUB Excel File    </legend>    <table width="100%">      <tr>            <td width="35%">                             </td>            <td width="65%">                             </td>      </tr>      <tr>            <td width="35%">                Upload LHUB Excel File               </td>            <td width="65%" align="right">                <input type="text" id="forviewpath" style="width:387px"/>                <input type="button" class="button" value="Browse"                     />                <input type="file" id ="excelfile" onchange="forviewpath.value = this.value;" hidefocus/>            </td>      </tr>      <tr>            <td width="35%">                             </td>            <td width="65%">                             </td>      </tr>      <tr>            <td width="35%">                             </td>            <td width="65%" style="word-break:normal;">                <font color="#F74A21" size="2">                  Please use the latest version of the LHUB Excel File to upload your trainee details.                </font>            </td>      </tr>    </table></fieldset>    <script>      var pLeft = document.getElementById("excelfile").offsetLeft;      var pTop = document.getElementById("excelfile").offsetTop;      function moveFile(obj)      {            obj.style.left = event.clientX - obj.offsetWidth/2;            event.srcElement.focus();      }    </script></body>
页: [1]
查看完整版本: input file style