Notice
Recent Posts
Recent Comments
Link
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- xcode12.5.1
- Oracle
- swift ๋ฉ๋ชจ์ฅ ๋ง๋ค๊ธฐ
- jxls ์์
- fullcalendar js
- MSsql
- mysql
- xssfworkbook
- js ์ ์์๋ช
- outofmemoryerror ๋ฐฉ์ง
- xssreader
- opcpackage
- PostgreSQL
- ios app ๊ฐ๋ฐ
- ๋์ฉ๋์์ ์ ๋ก๋
- xlsx-streamer
- monitorjbl ์์
- Swift
- xcode swift memo
- Xcode
- poi ๋์ฉ๋
- jxls
- ๋ฌ๋ ฅ๊ธฐ๋ฅ๊ฐ๋ฐ
- js๋ฌ๋ ฅ
- ์ ์์๋ช ๊ธฐ๋ฅ๊ตฌํ
- monitorjbl
- spring annotation
- swift ๊ณ์ฐ๊ธฐ
- poi monitorjbl
- ์ ์์๋ช ๊ฐ๋ฐ
Archives
- Today
- Total
web developer๐ฉ๐ป๐ป
[jQuery] ํ์ผ ์ ๋ก๋ input type = 'file' ๋ค์ค์ผ๋ก ์์ฑํ๊ธฐ ๋ณธ๋ฌธ
js
[jQuery] ํ์ผ ์ ๋ก๋ input type = 'file' ๋ค์ค์ผ๋ก ์์ฑํ๊ธฐ
natrue 2021. 10. 26. 17:18728x90
html
<ul class="__add">
<li>
<input type="file" id="QnA03" name="file_path" class="files" style="width: 231px; height: 46px;">
<button type="button"class="_add" style="vertical-align: sub">์ถ๊ฐ</button>
</li>
</ul>
js
var maxAppend = 1;
$('.__add ._add').on('click',function(){
if(maxAppend >= 3){
alert("ํ์ผ ์
๋ก๋ ์ต๋ ๊ฐ์๋ 3๊ฐ ์
๋๋ค.");
return;
}else{
$('.__add').append('<li><input type="file"name="file_path" class="files"> <button type="button" class="_add" onclick="addDel(this);">์ญ์ </button></li>');
maxAppend ++;
}
});
function addDel(a){
$(a).closest('li').remove();
maxAppend --;
}