상세 컨텐츠

본문 제목

[j쿼리] change

카테고리 없음

by esoesmio 2023. 5. 25. 17:52

본문

<!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>Title</title>
    <script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>

    <style>

    </style>
</head>
<body>
<div>
    <label>아이디
        <input type="text" id = "userid", name = "userid">
    </label>
</div>
</body>

<script>
$("#userid").on("change",()=>{
    alert($("#userid").val());
})

</script>
</html>

댓글 영역