First, you should not have multiple attributes with the same name. It kind of does not make sense. How would you differentiate between them?
Second, to read an attribute of an element you can use .attr() in jQuery. Look here for documentation:
http://api.jquery.com/attr/[
^]