Jump to content

what 's the meaning of this paragraf


runeveryday

Recommended Posts

Traversal also aids developers in affecting the elements immediately surrounding an element that is being

manipulated or otherwise utilized by a script. This can range from adding a class to parent elements to

indicate activity to disabling all inactive form elements to any number of other useful tasks.

can't understand the above,the paragraf  is from a book.anyone helps.thank you,

Link to comment
Share on other sites

paragraph* :) more to your question..

 

a parent element is an element which contains another element

 

 

<div>
  <span></span>
</div>

 

span's parent is div..

 

traversal is basically moving from element to element..

 

it basically says javascript makes it easy to traverse element to element even from a certain point.. E.G. getting <span>'s parent would be as simple as..

 

document.getElementsByTagName('span')[0].parentNode;

 

so when you read that paragraph just think traversal as moving from one element to another.. or between, outward and inward..

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.