from BeautifulSoup import BeautifulSoup
doc = Soup('<ul><li>1</li><li class="second">2</li><li>3</li></div>')
doc.select("li.second")
from lxml.etree import fromstring
from lxml.cssselect import CSSSelector
doc = fromstring('<ul><li>1</li><li class="second">2</li><li>3</li></div>')
selector = CSSSelector('li.second')
selector(doc)
window.addEventListener('DOMContentLoaded', () => {
//...
});
includeHTML - Loading HTML parts via HTML tag (pure js)
Supported protocols: http://, https://, file:///
Supported browsers: IE 9+, FF, Chrome (and may be other)
<include src="header.html"></include>
<html>
<head>
<script src="jquery.js"></script>
<script>
$(function(){
$("#includedContent").load("b.html");
});
</script>
</head>
<body>
<div id="includedContent"></div>
</body>
</html>