<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 模拟的更多相关文章

  1. input file 模拟预览图片。

    首先申明,接下来内容只是单纯的预览图片,最多选择九张,并没有和后台交互,交互的话需要自己另外写js. 本来想写一个调用摄像头的demo,意外的发现input file 在手机端打开的话,ios可以调用 ...

  2. HTML中上传与读取图片或文件(input file)----在路上(25)

    input file相关知识简例 在此介绍的input file相关知识为: 上传照片及文件,其中包括单次上传.批量上传.删除照片.增加照片.读取图片.对上传的图片或文件的判断,比如限制图片的张数.限 ...

  3. Apache服务器网站访问伪静态内页出现No input file specified.的完美解决方案

    原文地址:Apache服务器网站访问伪静态内页出现No input file specified.的完美解决方案 启用REWRITE的伪静态功能的时候,首页可以访问,而访问内页的时候,就提示:&quo ...

  4. 编译安装mmseg提示cannot find input file: src/Makefile.in错误

    今天安装中文词检索功能模块 coreseek,其中一个分词模块 mmseg ,编译安装到最后,出现annot find input file: src/Makefile.in aclocal   // ...

  5. HTML5的 input:file上传类型控制

    一.input:file属性 属性值有以下几个比较常用: accept:表示可以选择的文件MIME类型,多个MIME类型用英文逗号分开,常用的MIME类型见下表. multiple:是否可以选择多个文 ...

  6. input file控件限制上传文件类型

    网页上添加一个input file HTML控件: <input id="File1" type="file" /> 默认是这样的,所有文件类型都会 ...

  7. 完美解决 nginx No input file specified.

    一次开发中遇到了这个问题:No input file specified nginx版本1.8 找遍网络都是说 fastcgi_param SCRIPT_FILENAME $document_root ...

  8. 在webapp上使用input:file, 指定capture属性调用默许相机,摄像,录音功能

    ## 在webapp上使用input:file, 指定capture属性调用默认相机,摄像,录音功能 在iOS6下开发webapp,使用inputz之file,很有用 <input type=& ...

  9. 移动端头像上传AJax input file

    jQuery中的Ajax不能支持 input file 需要用ajaxupload.js但是先需要引入jQuery文件 <script src="__PUBLIC__/js/ajaxf ...

随机推荐

  1. 面向对象程序设计-C++_课时11new & delete

    Dynamic memory allocation new new int; new Stash; new int[10]; new返回这个对象的指针 delete delete p; delete[ ...

  2. hdu2222之AC自动机入门

    Keywords Search Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  3. Python操作Access数据库

    我们在这篇文章中公分了五个步骤详细分析了Python操作Access数据库的相关方法,希望可以给又需要的朋友们带来一些帮助. AD: Python编 程语言的出现,带给开发人员非常大的好处.我们可以利 ...

  4. spm3 基本

    spm3 命令 spm init //初始化一个spm模块,会生成基本配置以及测试文件等(下图). //注 初始化以后一般需要 鲜执行一下 spm install 安装默认依赖模块 index.js就 ...

  5. 动态加载 js

    要实现动态加载JS脚本有4种方法: 1.直接document.write <script language="javascript"> document.write(& ...

  6. ASPxGridView-单元格合并

    <dx:ASPxGridView ID="gridView" runat="server" ClientInstanceName="gvResu ...

  7. SQLSERVER 列名无效

    很多时候对数据库表修改字段后会出现“列名无效”,或者在查询分析器里面是红色的下划线,造成这个现象的原因是:SQL Server的intellisense(智能感知功能),没有感知到更改,需要重新整理一 ...

  8. mysql中判断表中是否存在某条记录

    SELECT CASE WHEN EXISTS (SELECT * FROM usergroupmap WHERE groupId = groupIdIn AND userId = v_friendI ...

  9. 利用Comparator排序

    import java.util.Comparator; class Studentxx {     private String nameString;     private int age;   ...

  10. video详解 HTML5中的视频:

    一.video 视频的方法.属性.事件详解 方法:play() 播放  pause() 暂停  属性:currentTime播放到当前的时间   duration视频的总时长 事件:ended 播放完 ...