Created
June 29, 2017 14:37
-
-
Save muzafferkoluman/02197119d50ebaa2777c92c12424cc1a to your computer and use it in GitHub Desktop.
parentlerle istenilene doğru ilerlemek
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="div1" style="background-color: burlywood"> | |
<p>Lorem ipsum dolor sit amet, nde voluptatem voluptates.</p> | |
<p>Lorem ipsum dolor sit amet, s.</p> | |
<p>Lorem ipsum dolor sit amet,rehenderit.</p> | |
<p>Lorem ipsum dolor sit amet,rehenderit.</p> | |
</div> | |
<button onclick="tikla()">Tikla</button> | |
<script> | |
function tikla() { | |
var parent=document.getElementById("div1"); | |
var child=parent.childNodes[3]; | |
child.style.color="blue"; | |
child.style.backgroundColor="red"; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment