getElementsByTagName in javascript


<html>
<head>
<title>getElementsByTagName Javascript</title>
<script>
function getElementFtn()
{
 alert(document.getElementsByTagName("p").item(0).innerHTML)
}
</script>
</head>

<body>
<p>this is first tag</p>

<p>this is second</p>

<p id="pID">this is third tag</p>

<p>this is forth tag</p>

<p>this is fifth tag</p>

<a href="javascript:getElementFtn()">check this element</a>
</body>
</html>

18 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. This is beyond doubt a blog significant to follow. You’ve dig up a great deal to say about this topic, and so much awareness. I believe that you recognize how to construct people pay attention to what you have to pronounce, particularly with a concern that’s so vital. I am pleased to suggest this blog.
    Data Science training in rajaji nagar | Data Science with Python training in chenni
    Data Science training in electronic city | Data Science training in USA
    Data science training in pune | Data science training in kalyan nagar

    ReplyDelete
  3. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.
    online Python certification course | python training in OMR | python training course in chennai

    ReplyDelete

  4. This is an awesome post.Really very informative and creative contents. These concept is a nice way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.


    Java training in Chennai

    Java training in Bangalore

    Java training in Hyderabad

    Java Training in Coimbatore

    Java Online Training

    ReplyDelete
  5. You have provided kind information for a new blogger so it has bowed down to be really helpful. I agree with many of your relevant points that you have included in this article.

    SAP training in Kolkata
    SAP course in kolkata

    ReplyDelete
  6. This is surely a thought provoking article. I would like to thank you for getting my neurons striking with this dazzling piece of article that you have written which contains every possible points which needs to well thought-out on the given topic.
    SAP training in Mumbai
    SAP course in Mumbai

    ReplyDelete