안녕하세요 여러분 cshtml에서 텍스트 상자의 색상을 변경하는 방법?. 어떻게 그것을 수행하는이 코드HTML 텍스트 상자에 조건으로 색상을 넣는 방법은 무엇입니까?
$("#BUTTON").click(function (event) {
var urlPA = URL;
var crty = $("#Courtesy").val();
var fname = $("#Familyname").val();
var gname = $("#GivenName").val();
if (crty != 0 && fname != 0 && gname != 0) {
$.ajax({
type: "GET",
url: urlPA,
data: 'DATA',
success: function (response) {
alert(response);
/// when success the color of the textbox return to normal
},
datatype: "text"
});
} else { alert("Please fill up the required fields.");
////// when error the textbox background makes red
}
});
이? 감사.
합니다. 나는 텍스트 상자가 색을 바꿀지 여부를 결정할 때 조건이 있습니다. 코드 예제를 참조하십시오. – UkI