зеркало из https://github.com/mozilla/pjs.git
27 строки
562 B
HTML
27 строки
562 B
HTML
<html>
|
|
<head>
|
|
<style>
|
|
div { color: red }
|
|
div::first-letter { color: green }
|
|
</style>
|
|
<script>
|
|
function doit() {
|
|
var parent = document.getElementById('a');
|
|
var kid = document.createElement("span");
|
|
kid.style.display="none";
|
|
parent.appendChild(kid);
|
|
|
|
parent = document.getElementById('b');
|
|
kid = document.createElement("span");
|
|
kid.style.display="none";
|
|
parent.insertBefore(kid, document.getElementById('x'));
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="doit()">
|
|
There should be no red
|
|
<div id="a">
|
|
T</div>
|
|
<div id="b">
|
|
T <span id="x"></span></div>
|
|
</html> |