내부 condition.Not 구문 문제처럼 .Looks 작업에 두 html.Textboxfor 필드를 해제하려고하는 경우 사용하는 방법.
$(document).ready(function() {
if (Model.Key == Guid.Empty) {
$("#@idPasswordTextBox").attr('disabled', 'disabled');
$("#@idConfirmPasswordTextBox").attr('disabled', 'disabled');
}
});
는인가요 방법은
당신의 ID를은'@ '기호로 시작? –
선택자에서'@'기호를 제거해보십시오. 실제로, # @ idPasswordTextBox 대신에'# idPasswordTextBox'를 사용합니다. – 65Fbef05
이들은 다음과 같이 정의 된 로컬 변수입니다. \t string idPasswordTextBox = "_Password_"+ @ Model.Key.ToString(); \t 문자열 idConfirmPasswordTextBox = "_ConfirmPassword_"+ @ Model.Key.ToString(); ID는 다음과 같이 지정됩니다. @ Html.PasswordFor (model => model.Password, new {id = @idPasswordTextBox}) – Patty