js 实现 input file 文件上传
<!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 文件上传的更多相关文章
- input file 文件上传标签的样式美化
input file 文件上传标签的样式美化 将<input type="file">的透明度设置为0: <input type="file" ...
- input file 文件上传,js控制上传文件的大小和格式
文件上传一般是用jquery的uploadify,比较好用.后面会出文章介绍uploadify这个插件. 但是,有时候为了偷懒,直接就用input 的file进行文件和图片等的上传,input fil ...
- 修改input file 文件上传的样式
Web页面中,在需要上传文件时基本都会用到<input type="file">元素,它的默认样式: chrome下: IE下: 不管是上面哪种,样式都比较简单,和很多 ...
- PHP 多input file文件上传
前台html jquery代码 后台PHP处理 前台html <form id="form" method="post" enctype="mu ...
- input file文件上传样式
<style> .file-group { position: relative; width: 200px; height: 80px; ...
- js 实现 input type="file" 文件上传示例代码
在开发中,文件上传必不可少但是它长得又丑.浏览的字样不能换,一般会让其隐藏点其他的标签(图片等)来时实现选择文件上传功能 在开发中,文件上传必不可少,<input type="file ...
- [置顶] js 实现 <input type="file" /> 文件上传
在开发中,文件上传必不可少,<input type="file" /> 是常用的上传标签,但是它长得又丑.浏览的字样不能换,我们一般会用让,<input type ...
- Selenium常用API用法示例集----下拉框、文本域及富文本框、弹窗、JS、frame、文件上传和下载
元素识别方法.一组元素定位.鼠标操作.多窗口处理.下拉框.文本域及富文本框.弹窗.JS.frame.文件上传和下载 元素识别方法: driver.find_element_by_id() driver ...
- input实现文件上传
input实现文件上传 input + ajax 实现文件上传,包括文件大小及类型的判断 一.html <input type="file" id="file&qu ...
随机推荐
- python之csrf简介
django为用户实现防止跨站请求伪造的功能,通过中间件 django.middleware.csrf.CsrfViewMiddleware 来完成.而对于django中设置防跨站请求伪造功能有分为全 ...
- pycharm安装模块方法
一. 打开pycharm 二. 点开file 三. 点击Settings,点击Project Interpreter,选择右上角+ 四. 进入后,在搜索框搜索需要安装的模块,选中安装 击Project ...
- 一条 SQL 引发的事故,同事直接被开除!!
前言 Insert into select请慎用. 这天xxx接到一个需求,需要将表A的数据迁移到表B中去做一个备份.本想通过程序先查询查出来然后批量插入.但xxx觉得这样有点慢,需要耗费大量的网络I ...
- pytest(1):安装与使用
pytest介绍 1.pytest是比较成熟的一款python测试框架 2.简单灵活,容易上手,对比unitest框架更丰富. 3.单元测试和复杂的功能测试,都支持. 4.同时支持selenium,a ...
- CTF-BugKu-杂项-1-20
2020.09.14 今天又是奥力给的一天,我的鼻炎啥时候能好啊--真是难受的一,影响学习和生活今天复习一遍杂项,应该挺快,毕竟这东西难就难在脑洞,做过一遍就全知道了,ok,let's go 做题 第 ...
- MIPS 架构流水线处理器
该项目系笔者大二时计算机组成课的课程设计,源代码及完整文档请移步 Github 仓库.
- java中对 闰年的计算 以及月份天数
import java.io.*;//局部变量的使用import java.util.Scanner; public class HelloJava { public static void ...
- 2019.8.13 sdfzoier
lxy: lixf acwing上的118,126 zhangtingyu zhaosirui wujialin
- Processing 状态量控制动画技巧
之前在CSDN上发表过: https://blog.csdn.net/fddxsyf123/article/details/62848357
- Tomcat 第四篇:请求处理流程(上)
1. 引言 既然是在讲 Tomcat ,那么一个 HTTP 请求的请求流程是无论如何也绕不开的. 首先抛开所有,使用我们现有的知识面,猜测一下一个请求被 Tomcat 处理的过程: 1. 客户端(浏览 ...