ajax e dom

This commit is contained in:
2014-12-07 19:33:49 +01:00
parent c30036a3bc
commit 7f21febb90
13 changed files with 423 additions and 64 deletions

28
dom1.html Normal file
View File

@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div>
<p>ciao</p>
<p>ciao</p>
<p>ciao</p>
<p>ciao</p>
<p>ciao</p>
<p>ciao</p>
</div>
<script>
document.querySelectorAll("div > p:nth-child(2n+2) ")[1].style="color:green";
</script>
</body>
</html>