text 박스에 값 넣기
본문 바로가기
IT. 컴퓨터

text 박스에 값 넣기

by 솔기잇 2014. 1. 14.




*jsp


1)

--list.jsp

:

<form name="searchForm" method="post" action="">

<input type="text" name="searchValue" class="textFiled"/>

<input type="button" value=" 검 색 " class="btn2" onclick="sendIt();"/>

<input type="button" value=" 값넣기 " class="btn2" onclick="insertIt();"/>

</form>


2)

function insertIt() {

window.open('popup.jsp','값이다.','statusbar=no'); 

}


3)

--popup.jsp

<body>

<table id="testRow" width="600" border="0" cellspacing="1" cellpadding="3" bgcolor="#CCCCCC" align="center">

<tr align="center" bgcolor="#E6E4E6" height="27">

<td id="num" width="40" onclick="num('555');">누름</td>

</tr>

</table>

</body>


4)

function num(number) {

opener.document.searchForm.searchValue.value = number;

window.close();

}








close