자바스크립트 18) 학생 관리 성적등록

hahahoho셍·2021년 5월 29일
0

자바스크립트

목록 보기
23/26
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function trai(){
            var a = 's001';
            var b = '홍길동';
            var c = '프로그래밍학과';
            var ss = sungjuc.surch.value;

            if(ss == ''){
                alert('조회정보 입력');
            }else if(ss == 's001'){
                sungjuc.bun1.value = a
                sungjuc.mename.value = b
                sungjuc.ga1.value = c;
            }else{
                alert('잘못된 조회정보');
            }

        }

    </script>
</head>
<body>
    <form action="" name="sungjuc">
    <table>
        <tr>
            <th>학번</th><th>학생코드/명</th>
            <td colspan="2"><input type="text" name="surch"></td>
            <td align="center"><input type="button" onclick="trai();" value="조회"></td>
        </tr>
        <tr>
            <th>학번 :</th>
            <th>이름 :</th>
            <th>학과 :</th>
        </tr>
        <tr>
            <th><input type="text" name="bun1" value=""></th>
            <th><input type="text" name="mename" value=""></th>
            <th><input type="text" name="ga1" value=""></th>
        </tr>

        <tr>
            <th>자바</th>
            <td colspan="2"><input type="text" size="47"></td>
        </tr>
        <tr>
            <th>jsp</th>
            <td colspan="2"><input type="text" size="47"></td>
        </tr>
        <tr>
            <th>오라클</th>
            <td colspan="2"><input type="text" size="47"></td>
        </tr>
    </table>
    </form>
</body>
</html>
profile
그냥 공부 한거 적는 벨로그 하하하핳ㅎ하하하핳하ㅏ

0개의 댓글

관련 채용 정보