답변 3개 / 댓글 8개
채택된 답변
+20 포인트
<input type="text" value="aaaaaa" style="color: red;" >
<input type="text" value="aaaaaa" style="color: #99CCCC;" >
답변에 대한 댓글 6개
<input type="text" id="test" value="aaaaaa" style="color: #99CCCC;" >
<script>
$(function() {
$("#test").focus(function(){
$(this).css("color","#000000");
});
$("#test").blur(function(){
$(this).css("color","#99CCCC");
});
});
</script>
<script>
$(function() {
$("#test").focus(function(){
$(this).css("color","#000000");
});
$("#test").blur(function(){
$(this).css("color","#99CCCC");
});
});
</script>
다시 설명해 주세요.
<input type="text" id="test" value="aaaaaa" style="color: #99CCCC;" >
<input type="text" id="test2" value="aaaaaa" style="color: #99CCCC;" >
가 있으면 test 클릭해서 포커스가 맞춰지면 검정색으로 글이 써지다가
다른곳을 클릭하면 #99CCCC 색으로 바뀝니다.
그런데 다른곳 test2를 클릭해서 포커스를 맞추면 test 가 검정색 글씨가 된다는 말씀인가요?
<input type="text" id="test" value="aaaaaa" style="color: #99CCCC;" >
<input type="text" id="test2" value="aaaaaa" style="color: #99CCCC;" >
가 있으면 test 클릭해서 포커스가 맞춰지면 검정색으로 글이 써지다가
다른곳을 클릭하면 #99CCCC 색으로 바뀝니다.
그런데 다른곳 test2를 클릭해서 포커스를 맞추면 test 가 검정색 글씨가 된다는 말씀인가요?
입력됐을 때 값 말씀하시는건지 아니면 placeholder 를 말씀하시는지 ?
답변을 작성하려면 로그인이 필요합니다.