A Little Function

Discussion in 'Programming' started by vBPoint.Com, Aug 12, 2008.

  1. #1
    Here is a little function :-

    document.getElementsByClassName=function(v){
    e=document.getElementsByTagName("*"),f=[];
    for(i in e)if(e[i].className==v)f.push(e[i]);
    return f;};
    Code (markup):

    Returns an array of HTML elements based upon the given class name
     
    vBPoint.Com, Aug 12, 2008 IP
  2. minibuck

    minibuck Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    this is a new js function. But it used for what purpose ? :D
     
    minibuck, Aug 12, 2008 IP