<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="js/jquery/jquery-1.8.2.min.js" type="text/javascript"></script>
<style type="text/css">
._box
{
width: 119px;
height: 37px;
background-color: #53AD3F;
background-image: url(images/bg.png);
background-repeat: no-repeat;
background-position: 0 0;
background-attachment: scroll;
line-height: 37px;
text-align: center;
color: white;
cursor: pointer;
}
.none
{
width: 0px;
height: 0px;
display: none;
}
</style>
<title>js 实现 input file 文件上传 /></title>
</head>
<body>
<form id="form1" runat="server" method="post" enctype="multipart/form-data">
<div>
<div class="_box">选择图片</div>
</div>
<div class="none">
<input type="file" name="_f" id="_f" />
</div>
</form>
</body>
</html>
<script type="text/javascript">
jQuery(function () {
$("._box").click(function () {
return $("#_f").click();
});
});
</script>

  

js 实现 input file 文件上传的更多相关文章

  1. input file 文件上传标签的样式美化

    input file 文件上传标签的样式美化 将<input type="file">的透明度设置为0: <input type="file" ...

  2. input file 文件上传,js控制上传文件的大小和格式

    文件上传一般是用jquery的uploadify,比较好用.后面会出文章介绍uploadify这个插件. 但是,有时候为了偷懒,直接就用input 的file进行文件和图片等的上传,input fil ...

  3. 修改input file 文件上传的样式

    Web页面中,在需要上传文件时基本都会用到<input type="file">元素,它的默认样式: chrome下: IE下: 不管是上面哪种,样式都比较简单,和很多 ...

  4. PHP 多input file文件上传

    前台html jquery代码 后台PHP处理 前台html <form id="form" method="post" enctype="mu ...

  5. input file文件上传样式

    <style>    .file-group {        position: relative;        width: 200px;        height: 80px;  ...

  6. js 实现 input type="file" 文件上传示例代码

    在开发中,文件上传必不可少但是它长得又丑.浏览的字样不能换,一般会让其隐藏点其他的标签(图片等)来时实现选择文件上传功能 在开发中,文件上传必不可少,<input type="file ...

  7. [置顶] js 实现 <input type="file" /> 文件上传

    在开发中,文件上传必不可少,<input type="file" /> 是常用的上传标签,但是它长得又丑.浏览的字样不能换,我们一般会用让,<input type ...

  8. Selenium常用API用法示例集----下拉框、文本域及富文本框、弹窗、JS、frame、文件上传和下载

    元素识别方法.一组元素定位.鼠标操作.多窗口处理.下拉框.文本域及富文本框.弹窗.JS.frame.文件上传和下载 元素识别方法: driver.find_element_by_id() driver ...

  9. input实现文件上传

    input实现文件上传 input + ajax 实现文件上传,包括文件大小及类型的判断 一.html <input type="file" id="file&qu ...

随机推荐

  1. python之class Meta用法

    Django model中的 class Meta 详解   通过一个内嵌类 "class Meta" 给你的 model 定义元数据, 类似下面这样: class Foo(mod ...

  2. 分布式系统监视zabbix讲解五之web监控

    Web 监控 概况 你可以使用 Zabbix 检查几个网站可用性方面. 如果要使用 Web 检测功能,必须在 编译Zabbix 的时候加入 cURL(libcurl) 的支持. 要使用 Web 监控, ...

  3. Vue elelment登录验证 简单版

    http.js import axios from 'axios' import { Message, Loading } from 'element-ui'; import router from ...

  4. Python实现自动生成小学四则运算题目

    Github地址: https://github.com/guoyuyi/gyy.github.io/blob/%E4%BD%9C%E4%B8%9A1/zy1.py 题目描述: 通过python语言编 ...

  5. Vue结合Django-Rest-Frameword结合实现登录认证(一)

    作者:小土豆biubiubiu 博客园:https://www.cnblogs.com/HouJiao/ 掘金:https://juejin.im/user/2436173500265335 微信公众 ...

  6. Spring学习(一)初识Spring

    什么是Spring 定义:Spring 是一个轻量级的 DI / IoC 和 AOP 容器的开源框架,目的为了简化java开发. DI:注入 IOC:控制反转 AOP:面向切面编程 原理:利用了jav ...

  7. 在移动硬盘上安装Linux Mint19记录

    前要: 有一12年买的手提电脑,打算在其上直接装linux部署分布式爬虫顺便学linux 唔,开机吧--然开机动画没有,只有间断有序的悲鸣,一查,主板逝世 卖给收买旧电脑估计不到20-不能忍,想了想不 ...

  8. netty关键字

    ------------恢复内容开始------------ buffer 本质读写的内存,三个属性:capacity.position和limit capacity:容器大小 position:读写 ...

  9. springmvc与mybatis整合时 java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required 异常

    今天在整合springmvc与mybatis时,启动服务器遇到这样一个问题, by: java.lang.IllegalArgumentException: Property 'sqlSessionF ...

  10. Centos6.6x系统与unbutu18.04系统升级ssh到8.3版本

    Centos6.6升级ssh5.3版本到ssh8.3版本 下载所需要的源码包: ]#wget https://files-cdn.cnblogs.com/files/luckjinyan/zlib-1 ...