<!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>
$(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를 주고싶은데 스타일을 어떻게 줘야하죠..?