단순하게 객체(버튼 또는 Text box 등)을 보기/않보이기 기능
<html>
<head>
<title> Text Box Hidden </title>
<script language="JavaScript" type="text/JavaScript">
<!--
function SelectChange(arg1)
{
var form = document.formSearch;
if(arg1 < "2")
{
form.I_Sinpt.style.visibility = 'visible';
}
else
{
form.I_Sinpt.style.visibility = 'hidden';
}
}
//-->
</script>
</head>
<body>
Text box 숨기기
<table border="0" align="center" cellpadding="0" cellspacing="0">
<form name="formSearch" method="post">
<tr>
<td width="80">
<select name="I_Sflag" class="tbox" onChange = "SelectChange(this.value);">
<option value="1" >하나</option>
<option value="2" >둘</option>
<option value="3" >셋</option>
</select>
</td>
<td width="20">
<input name="I_Sinpt" type="text" class="tbox" size="20" value="" onkeypress="enter()">
</td>
</tr>
</form>
</table>
</body>
</html>
댓글 없음:
댓글 쓰기