HTML/CSS/JAVASCRIPT 강의실

시삽: 레드플러스 님 
게시판 이동:
 제목 : 자바스크립트 객체 연습
글번호: 50
작성자: 관리자
작성일: 2002/03/13 오후 7:33:00
조회수: 4245
<HTML>
<HEAD>
<TITLE>자바스크립트 주요 객체</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">

<script language="javascript">

function check()
{
    if(window.document.testform.id.value == "")
    {
        alert("아이디를 넣어주세요");
        document.testform.id.focus();
        document.testform.id.select();
        return true;
    }
    if(window.document.testform.id.value.length <3 || window.document.testform.id.value.length > 15)
    {
        alert("아이디를 3자이상 15자 이하로 넣어주세요");
        document.testform.id.focus();
        document.testform.id.select();
        return true;
    }
    if(window.document.testform.pwd.value == "")
    {
        window.alert("패스워드를 넣어주세요");
        window.document.testform.pwd.focus();
        window.document.testform.pwd.select();
        return true;
    }
    document.testform.submit();
}


//document객체
//write메소드

//document.write("<b style='font-size:9pt;'>화면에 내용을 출력</b><br>");

//document.write(document.title);

//document.bgColor = "red";
//document.fgColor = "blue";


//window객체
//window.alert("메시지박스 출력");

//window.confirm("확인 또는 취소를 선택하세요");

//window.prompt("당신의 이름은???","여기다 적으세요");

//window.open("http://www.xpplus.net/", "xpplus", "fullscreen");

//window.close();

//window.setTimeout("alert('꽝~');",3000);


</script>
<!--
<input type="button" value="창닫기" onclick="window.close();">

<input type="button" value="뒤로" onclick="history.go(-1);">
<input type="button" value="앞으로" onclick="history.go(1);">
<input type="button" value="새로고침" onclick="history.go(0);">
<input type="button" value="뒤로" onclick="history.back();">
<input type="button" value="앞으로" onclick="history.forward();">


<input type="button" value="강의실로 이동" onclick="location.href='http://www.xpplus.net/';">

<input type="button" value="새로고침" onclick="location.reload();">
-->



<form name="testform"
action="http://www.xpplus.net/webmaster/lecture/HTML/QueryString연습.asp"
method="post"
>

아이디입력 : <input type="text" name="id"><br>
패스워드 입력 : <input type="password" name="pwd"><br>
<input type="button" value="■값 전송■" onclick="return check();">


</form>

</BODY>
</HTML>
 
이전 글   다음 글 삭제 수정 답변 글쓰기 리스트

(댓글을 남기려면 로그인이 필요합니다.)

관련 아티클 리스트
  제       목 파일 작성자 작성일 조회
이전글 활용 예제. 페이지 로딩 프로그레스바(상태 표시줄) 출력 - 관리자 2002-03-13 7248
현재글 자바스크립트 객체 연습 - 관리자 2002-03-13 4245
다음글 마우스 오버시 테이블 테두리 변하는 스크립트 소스 - 관리자 2002-02-14 5286
 
손님 사용자 Anonymous (손님)
로그인 Home