본문 바로가기

IT 프로그래밍/소스모음

장소,위치추가 textbox 스크립트

<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<script language="javascript">
<!--
function addInputBox(){
 var addStr = "<input type=text name=test size=20>";
 var table = document.getElementById("dynamic_table");
 var newRow = table.insertRow();
 var newCell = newRow.insertCell();
 
 newCell.innerHTML = addStr;
 }
 
function subtractInputBox(){
 var table = document.getElementById("dynamic_table");
 table.deleteRow(0);
 }
//-->
</script>

<BODY>

<a href="javascript:addInputBox();">+ inputBox 추가</a>  : <a href="javascript:subtractInputBox();">- inputBox 감소</a>
<table cellpadding=0 cellspacing=0 id="dynamic_table">
</table>
</BODY>
</HTML>
/SPAN>

'IT 프로그래밍 > 소스모음' 카테고리의 다른 글

window.open()  (0) 2009.03.19
프린트컴포넌트  (0) 2009.03.19
메일보내기,프린트,셀렉트 박스 내지 checkbox 체크 유무  (0) 2009.03.19