게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
jquery css 간단한건데 잘 모르겠네요..
게시물ID : programmer_9466짧은주소 복사하기
작성자 : Naachal
추천 : 0
조회수 : 401회
댓글수 : 1개
등록시간 : 2015/04/20 23:21:16
<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">

  <title>Document</title>

  <style>
inco{
text-align:left; 
}
co{
text-align:left; background-color="blue"
}
  </style>

<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$(function(){

$("#pwd_confirm").keyup(function(){
if($("#pwd").val() != $("#pwd_confirm").val()){
$("div").remove();
$("tr:last td:last").append("<div>incorrect</div>");
}
else{
$("div").remove();
$("tr:last td:last").append("<div id='co'>correct</div>");
}
});
});

</script>
 </head>
 <body>
  
<table style="border:1px solid gray">
<tr>
<td>Password:</td>
<td><input type="password" id="pwd"></td>
</tr>
<tr>
<td>Password Confirm:</td>
<td>
<input type="password" id="pwd_confirm"></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>

 </body>
</html>


여기서 incorrect일땐 빨간색 correct일땐 파란색으로 background color를 주고싶은데 스타일을 어떻게 줘야하죠..?
꼬릿말 보기
전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호