码迷,mamicode.com
首页 > 其他好文 > 详细

input file 模拟

时间:2016-07-30 21:04:18      阅读:206      评论:0      收藏:0      [点我收藏+]

标签:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>定义input type="file" 的样式</title>
<style type="text/css">

</style>
</head>
<body>
<div >
  <form action="" method="post" enctype="multipart/form-data">
       <textarea id="textfield" style="width:400px;height:300px"></textarea>
<br/>

    <div style="float:left">

        <button style="width:100px;height:100px;font-size:20px;text-align:center;" value=‘浏览...‘ >浏览...</button>
    </div>
    <div style="float:left">
         <input type="file" name="fileField"  
          style
="opacity:0;width:100px;height:100px;margin-left:-100px;text-align:center"
         id="fileField"
          onchange
="document.getElementById(‘textfield‘).value=this.value"/> </div> <div style="float:left"> <button type="submit" name="submit" style="margin-left:5%;width:100px;height:100px;font-size:20px" value="上传" >上传</button> </div> </form> </div> </body> </html>

 

input file 模拟

标签:

原文地址:http://www.cnblogs.com/huhanbo/p/5721662.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!