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
- post๋ฐฉ์
- ๋ช ๋ น์ด
- ๋ฐฐ์ด
- order by
- select
- ๋ณ์
- ๋์ปค
- JSP
- ๋์
- SQL
- JavaScript
- MySQL
- ๋์ ํ ์ด๋ธ
- ํจ์
- like
- Ajax
- ์๋ฐ์คํฌ๋ฆฝํธ
- ์ธ๋ผ์ธ๋ทฐ
- ๋ฐฑํฑ
- ํ๋ก๊ทธ๋๋จธ์ค
- oracle
- ํ ์ด๋ธ
- ๋ฆฌ๋ ์ค
- Update
- ์ฝํ
- DATE_FORMAT
- ์ปจํธ๋กค๋ฌ
- Spring
- optionํ๊ทธ
- JS
Archives
- Today
- Total
bom's happy life
[JS]๋์ Form ์์ฑํ๊ธฐ + ์จ๊ฒจ์ ์ปจํธ๋กค๋ฌ๋ก ์ด๋ํ๊ธฐ ๋ณธ๋ฌธ
Deveolpment Study๐๏ธ/Javascript
[JS]๋์ Form ์์ฑํ๊ธฐ + ์จ๊ฒจ์ ์ปจํธ๋กค๋ฌ๋ก ์ด๋ํ๊ธฐ
bompeach 2023. 5. 31. 10:54ajax๋ก ๋ฐ์ดํฐ ๋ณด๋ด๋ ค๋ค๊ฐ ์ด์ฐจํผ ํ์ด์ง ์ด๋์ ํ ๊ฒ์ด๊ธฐ ๋๋ฌธ์
(๋น๋๊ธฐ ๋ฐฉ์์ ๊ตณ์ด ์ฌ์ฉํ์ง ์์๋ ๋์)
๋์ form์ ์์ฑํ๊ณ ์จ๊ฒจ์ ์ปจํธ๋กค๋ฌ๋ก ์ด๋ํด์ฃผ์๋ค!
์์ฝํ๊ธฐ ๋ฒํผ ํด๋ฆญ ์ ๊ฐ์ง๊ณ ๊ฐ ์ ๋ณด๋ค form์ ๋ฃ์ด์ ์ปจํธ๋กค๋ฌ๋ก ๋ณด๋ด๊ธฐ!!
function placeRentAdd(rentDate,rentTime) {
//alert(rentDate);
//alert(rentTime);
confirm("์์ฝํ์๊ฒ ์ต๋๊น?");
var form = document.createElement("form");
form.setAttribute("charset", "utf-8");
form.setAttribute("method", "POST"); //๋ณด๋ผ ๋ฐฉ์ POST
form.setAttribute("action", "/rentPlaceForm.do"); //์์ฒญํ ์ฃผ์
var rentInfo = document.createElement("input");
rentInfo.setAttribute("placeNm", "${placeNm}");
rentInfo.setAttribute("rentDate", rentDate);
rentInfo.setAttribute("rentTime", rentTime);
form.appendChild(rentInfo);
form.style.display = "none"; //ํผ ์จ๊ธฐ๊ธฐ
document.body.appendChild(form);
form.submit();
}
'Deveolpment Study๐๏ธ > Javascript' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[JS] for๋ฌธ๊ณผ forEach๋ฌธ์ ์ฐจ์ด? + "-1๋ก ์ด๊ธฐํ ํ๋ ์ด์ " (0) | 2023.06.01 |
---|---|
[JS] ๋์ ํ ์ด๋ธ ๋ง๋ค๊ธฐ!! ํ ์ด๋ธ์ ํ ์ถ๊ฐ/์ญ์ (0) | 2023.05.31 |
[JS] ๋์ ํ ์ด๋ธ ํ๊ทธ๋ฅผ " "๊ฐ ์๋ ``๋ฐฑํฑ์ผ๋ก ํด์ฃผ๋ ์ด์ ? (0) | 2023.05.26 |
[AJAX] AJAX์ ๋์ ํ ์ด๋ธ ์์ฑํ๊ธฐ (0) | 2023.05.26 |
[JQUERY] ๋ชจ๋ฌ์ฐฝ ๊ตฌ์กฐ + ์ธ๋ถ ์์ญ ํด๋ฆญ ์ ๋ซํ (0) | 2023.05.24 |