html
<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>目标检测</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"
1
2
3
4
5
6
7
8
rel=“stylesheet”>
<link href="css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
<img src="img/header.jpg" width="100%" height="200" />
<div class="container">
1
2
3
4
5
<div class="dataItem">
<div class="dataFrame"></div>
</div>
<form enctype="multipart/form-data">
<div class="form-group">
<input id="file-select" type="file" >
</div>
</form>
<form enctype="multipart/form-data">
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="js/fileinput.js" type="text/javascript"></script>
<script src="js/fileinput_locale_zh.js" type="text/javascript"></script>
<script>
$("#file-select").fileinput({
uploadUrl: '#', // you must set a valid URL here else you will get an error
allowedFileExtensions : ['jpg', 'png','gif'],
overwriteInitial: false,
maxFileSize: 1000,
maxFilesNum: 10,
//allowedFileTypes: ['image', 'video', 'flash'],
slugCallback: function(filename) {
return filename.replace('(', '_').replace(']', '_');
}
});
</script>
</body>
</html> |