পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Wednesday, March 8, 2017

Prototype - Utility Methods

The Prototype library comes with lot of predefined objects and utility functions. You can use those functions and objects directly in your JavaScript programming.
These methods are one of the cornerstones of efficient Prototype-based JavaScript coding. Spend some time to study them to become comfortable with the methods.

This chapter details all these useful methods with examples.
S.No. Method & Description
1. $() If provided with a string, returns the element in the document with matching ID; otherwise returns the passed element.
2. $$() Takes an arbitrary number of CSS selectors (strings) and returns a document-order array of extended DOM elements that match any of them.
3. $A() Converts the single argument it receives into an Array object.
4. $F() Returns the value of a form control. This is a convenience alias of Form.Element.getValue.
5. $H() Converts objects into enumerable Hash objects that resemble associative arrays.
6. $R() Creates a new ObjectRange object.
7. $w() Splits a string into an Array, treating all whitespace as delimiters.
8. Try.these Accepts an arbitrary number of functions and returns the result of the first one that doesn't throw an error.

document.getElementsByClassName

This method retrieves (and extends) all the elements that have a CSS class name of className.
However, this method has been deprecated in the latest versions of Prototype.

No comments:

Post a Comment