Jquery를 쓸때는 innerHtml 대신 .html()을 사용해야함.
alertDiv 선택시 Jquery를 선택했기때문에, Jquery 에서 제공하지 않는 property 인 innerHTML을 사용할 수 없다.
let alertDiv = $("#alertDiv");
const alertDivContent = `<div class='alert alert-success alert-dismissible' role='alert'><button type='button' class='btn-close' data-dismiss='alert' aria-label='Close'></button>\
<div class='alert-icon'><span data-feather='bell'></span></div>\
<div class='alert-message'><strong>Success!</strong> The Article successfully saved.</div></div>`;
alertDiv.html(alertDivContent);
728x90
'Learning > Basic' 카테고리의 다른 글
이클립스 단축키 (0) | 2022.11.05 |
---|---|
여러개의 Input tag 데이터를 DB에서 한 컬럼에 넣기 (0) | 2022.10.10 |
textarea 공백 살려서 출력 (0) | 2022.09.22 |
네이버 스마트 에디터2 다운 (0) | 2022.08.31 |
VDI (가상 데스크톱 환경) (0) | 2022.08.22 |