jQuery动态添加<input type="file">

(编辑:jimmy 日期: 2024/10/4 浏览:2)

有时候需要在页面上允许用户上传多个文件,个数由用户自己决定,个数多了也可以删除,使用jQuery可以很简单的实现这个功能。

先给大家展示下效果图:

jQuery动态添加<input type="file">

<!DOCTYPE html>
<html>
<head>
<title>test.html</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-1.6.4.min.js">

介绍JQuery获取input type="text"中的值的各种方式

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JQuery获取文本框的值</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script src="/UploadFiles/2021-04-02/jquery-1.5.1.min.js">