input value 값을사용했는데 색이너무 진해서요
input value css로 색을 바꾸려면 어떻게 해야 할까요?
답변 3개 / 댓글 8개
채택된 답변
+20 포인트
2018-07-13 (금) 15:04:41
<input type="text" value="aaaaaa" style="color: red;" >
<input type="text" value="aaaaaa" style="color: #99CCCC;" >
답변에 대한 댓글 6개
2018-07-13 (금) 15:43:19
네 이렇게 하면 근데 글 쓸때도 흐릿한 색이여서요 글 쓰면 검은색으로 나오고 싶습니다 ㅠ
2018-07-13 (금) 15:56:47
<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>
2018-07-13 (금) 16:49:43
답변감사합니다. 그런데 오류가 있는게 그냥 클릭했다가 다른곳 클릭하면 다시 색이 검정색으로 돌아옵니다 ㅠㅠ
2018-07-13 (금) 17:12:08
다시 설명해 주세요.
<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 가 검정색 글씨가 된다는 말씀인가요?
2018-07-16 (월) 10:02:02
안에 글씨를 쓰면 검정색으로 그대로 있어야 하는데 다른곳을 클릭하면 색이 회색으로 변해버려서요 ㅠㅠ
입력됐을 때 값 말씀하시는건지 아니면 placeholder 를 말씀하시는지 ?
답변에 대한 댓글 1개
2018-07-13 (금) 14:48:37
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.