본문 바로가기

About Security/PHP & MYSQL

12월 17일 배운내용 javascript관련

<input type ="hidden" name="sendvar" value="쉿">


<input type ="image" src="./images/btn_confirm.gif">
<input type ="button" value="취소" onClick="document.form1.reset()">
<input type ="button" value="당신의이름은?" onclick="showName()">


<input type="text" name="usernm" value="이름을입력하세요"
onClick="cleartxt()"><br>


<script language="javascript">
 function showName(){
alert(document.form1.usernm.value);
alert(document.form1.gender[0].checked);
}

 function cleartxt(){
document.form1.usernm.value = "";
  }
</script>


<input type="text" name="usernm" value="이름을입력하세요"
readonly><br>

<input type="text" name="usernm" value="이름을입력하세요"
disabled><br>

<input type="text" name="usernm" value="이름을입력하세요"
maxlength="5">