Добавляем один раз в Javascript
Как мне добавить один код:
$('.faq_info').append(
'<ul>' +
'<li>Highlighted code for double html, body, and head tags means its invalid.</li>' +
'<li>Check highlighted iframe tags if it effects link placement.</li>' +
'<li>Highlighted charset means its not UTF8 or it is a bad charset.</li>' +
'<li>Highlighted symbols means that they are effecting the link.</li>' +
'<li>Check highlighted comments if it effects the link placement.</li>' +
'<li>If client url is highlighted it means something else in the source is causing it to be invalid.</li>' +
'<li>Check to see if client url is in the source code.</li>' +
'</ul>'
);
1 ответ
Решение
Я просто сделал следующее $('div.faq_info'). Empty(). Append('любая строка'); и это работает. Он в основном очищает все, что находится в div и добавляет после.