ajax e dom
This commit is contained in:
28
dom1.html
Normal file
28
dom1.html
Normal 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>
|
||||
Reference in New Issue
Block a user