SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Jul 2004
    Location
    Brooklyn, NY
    Posts
    316
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help covert IE-only code into FF-compatible code

    what do I need to change to make this work in Firefox?


    Code JavaScript:
    	var submitArray = document.getElementsByTagName('input');
    for(var i=0;i<submitArray.length;i++){
    	alert(submitArray[i].attributes('type').value);
    }

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try:
    Code:
    alert(submitArray[i].getAttribute('type'));


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •