国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

基于bootstrap的文件上傳控件bootstrap fileinput

2019-11-19 18:18:29
字體:
供稿:網(wǎng)友

本文實例為大家分享了文件上傳控件bootstrap fileinput的使用方法,供大家參考,具體內(nèi)容如下

github地址:https://github.com/kartik-v/bootstrap-fileinput
官網(wǎng):http://plugins.krajee.com/file-input

1.下載壓縮文件.

2.導(dǎo)入文件

bootstrap-fileinput/css/fileinput.min.css
bootstrap-fileinput/js/fileinput.min.js

如果需要考慮中文化,那么還需要引入文件:

bootstrap-fileinput/js/fileinput_locale_zh.js

<link type="text/css"rel="stylesheet"href="${ctx}/components/fileinput/css/fileinput.css" /><script type="text/javascript" src="${ctx}/components/fileinput/js/fileinput.js"></script><script type="text/javascript" src="${ctx}/components/fileinput/js/fileinput_locale_zh.js"></script><body><input type="file" name="image" class="projectfile" value="image.png"/><!--1. type=file和class=projectfile,指明其為input file類型。 2. name指定其在后臺的獲取key。 3. value指定其在展示的時候圖片路徑。--></body><script> control.fileinput({ language: 'zh', //設(shè)置語言 uploadUrl: uploadUrl, //上傳的地址 allowedFileExtensions : ['jpg', 'png','gif'],//接收的文件后綴 showUpload: false, //是否顯示上傳按鈕 showCaption: false,//是否顯示標題 browseClass: "btn btn-primary", //按鈕樣式   previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",  });</script>

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持武林網(wǎng)。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 余江县| 乐清市| 临桂县| 雷州市| 花莲县| 高青县| 二手房| 类乌齐县| 平远县| 罗江县| 许昌县| 深泽县| 米泉市| 平武县| 靖远县| 新闻| 桃江县| 河间市| 永吉县| 新兴县| 日喀则市| 花莲县| 三穗县| 昭觉县| 玛沁县| 高要市| 武平县| 东明县| 开远市| 泗阳县| 普兰店市| 平湖市| 元阳县| 楚雄市| 伊春市| 汕头市| 丹棱县| 仲巴县| 维西| 民勤县| 甘孜县|