0
이없는 경우 내가 가진이 잘 작동 문 '의 경우'자바 스크립트 (프로토 타입) 요소 프로토 타입에 속성
if(parentForm.hasAttribute('action')){
console.log('hello world')
}
그러나, 어떻게 내가 'parentForm가없는 경우 속성 행동으로이 설정 않습니다 '진술?
감사합니다. Adi.
이없는 경우 내가 가진이 잘 작동 문 '의 경우'자바 스크립트 (프로토 타입) 요소 프로토 타입에 속성
if(parentForm.hasAttribute('action')){
console.log('hello world')
}
그러나, 어떻게 내가 'parentForm가없는 경우 속성 행동으로이 설정 않습니다 '진술?
감사합니다. Adi.
단순히 logical not operator을 사용하여 조건부를 부정합니다.
if(!parentForm.hasAttribute('action')){
console.log('hello world')
}