<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. linux环境之监听端口配置

    export JAVA_OPTS="-Dcom.sun.management.jmxremote.port=18950 -Dcom.sun.management.jmxremote.auth ...

  2. 删除select中所有option选项

    这样写 <select id="search"> <option>baidu</option> <option>sogou</ ...

  3. 《Linux命令行与shell脚本编程大全》 第十四章 学习笔记

    第十四章:呈现数据 理解输入与输出 标准文件描述符 文件描述符 缩写 描述 0 STDIN 标准输入 1 STDOUT 标准输出 2 STDERR 标准错误 1.STDIN 代表标准输入.对于终端界面 ...

  4. 君子性非异也,善假于物也 - Threejs 引入TrackballControls 查看场景

    君子性非异也,善假于物也 - Threejs 引入TrackballControls 查看场景 太阳火神的漂亮人生 (http://blog.csdn.net/opengl_es) 本文遵循" ...

  5. .Net C# ASP.Net和ADO.Net

    1.NET是一个平台,一个抽象的平台的概念. .NET平台其本身实现的方式其实还是库,抽象层面上来看是一个平台. .NET Framework包括两个关键组成元素: a.Common Language ...

  6. css两个紧挨着的css选择器修饰同一个元素

    #status, .commands{ height: 25px; line-height: 25px;}.upload .commands{ float: right;}.hidden{ displ ...

  7. Samba在CentOS下的图形化界面的安装

    第一步:构建yum仓库(在此用的是北交大的yum仓库) 打开目录/etc/yum.repos.d下的CentOS-Base.repo文件,此处是我自己建的yum仓库,修改里面的链接地址为北交大的镜像的 ...

  8. c# 柱状图(转载)

    // c# 显示柱状图 using System; using System.Data; using System.Configuration; using System.Web; using Sys ...

  9. Nio Client

    public class NIOClient { static int SIZE = 2; final static int bufferSize = 500 * 1024; static InetS ...

  10. android 文件操作类简易总结

    android 文件操作类(参考链接) http://www.cnblogs.com/menlsh/archive/2013/04/02/2997084.html package com.androi ...