<body>
<h1>입력 양식 선택자</h1>
텍스트 상자: <input type="text"> <br>
버튼 : <input type="button" value="버튼"> <br>
체크박스 : <input type="checkbox" name="" id=""> <br>
파일선택 : <input type="file" name="" id=""><br>
이미지 : <input type="image"
src="../FRONT_HTML_CSS/WebContent/img/dog-g559b26e85_1920.jpg"
alt="" width="500px" height="300px"> <br>
<script>
$(function(){
$('input:text').css('background','lemonchiffon');
$('input:button').val('짱크게!')
.css({width : '100px',
'height':'100px'});
$('input:checkbox').attr('checked',true);
$('input:file').css('background','yellow');
$('input:image').mouseenter(function(){
$(this).attr('src','#');
});
$('input:image').mouseout(function(){
$(this).attr('stc','#');
});
});
</script>
'JQUERY > 함수' 카테고리의 다른 글
select option change (0) | 2022.08.28 |
---|---|
checkbox 관련 (0) | 2022.08.28 |
input의 속성값 가져오기 (0) | 2022.08.25 |
마우스 포인트 위치할때와 잃었을때 focus()/ bulr() (0) | 2022.08.25 |
toggle 이란 (0) | 2022.08.25 |