일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- rowspan
- Eclipse
- jsr 296
- GPS
- node.js
- WebLogic
- Spring
- 전자정부프레임워크
- 가우스
- MFC
- phonegap
- Struts
- sencha touch
- oracle
- Google Map
- PLSQL
- ibsheet
- PHP
- Ajax
- JDOM
- appspresso
- jQuery
- dock
- Android
- MySQL
- tomcat
- swingx
- JSON
- 선택적조인
- iBATIS
Archives
- Today
- Total
Where The Streets Have No Name
form 태그를 동적으로 생성 본문
function godelete(no){
if(confirm('삭제하시겠어요?')){
var o = document.createElement("form");
var oi1 = document.createElement("input");
var oi2 = document.createElement("input");
oi1.setAttribute('name','no');
oi2.setAttribute('name','mode');
oi1.setAttribute('value',no);
oi2.setAttribute('value','delete');
o.appendChild(oi1);
o.appendChild(oi2);
document.body.appendChild(o);
o.setAttribute('method','post');
o.setAttribute('action','./Process.php');
o.submit();
}
}
<input type=button onclick=godelete(no) value='del'>
if(confirm('삭제하시겠어요?')){
var o = document.createElement("form");
var oi1 = document.createElement("input");
var oi2 = document.createElement("input");
oi1.setAttribute('name','no');
oi2.setAttribute('name','mode');
oi1.setAttribute('value',no);
oi2.setAttribute('value','delete');
o.appendChild(oi1);
o.appendChild(oi2);
document.body.appendChild(o);
o.setAttribute('method','post');
o.setAttribute('action','./Process.php');
o.submit();
}
}
<input type=button onclick=godelete(no) value='del'>