0
我无法添加元素<p>TEST</p>
前后<h1>
标签在我的网页添加到DOM元素负载()(jQuery的)
这里是我的代码(简化):
的index.html
<div class="container" id="page_body"> BLABLA </div>
properties.html
<h1>Properties Management</h1>
menu.html
<li><a href="#" id="link_properties">Properties Repository</a></li>
JS
$("#page_menu").on('click', '#link_properties', function(e) {
$("#page_body").load("properties.html"); // Properties
$('h1').before('<p>TEST</p>');
});
THX做工精细
<h1>Properties Management</h1>
之前插入<p>
:) – geekInside