Both are pieces of cardiovascular equipment. In that they are equal. I find that many people prefer the elliptical trainers because it has less on an impact on the joints.
However, when doing interval training based on pre-defined heart rate zones, the treadmill may have an edge. On the elliptical, your options for working harder are to a) go faster or b) increase the resistance. While that is clearly possible, it is ultimately self-selective compared to a treadmill which paces you in terms of speed and elevation. Adding elevation to a treadmill workout can increase the workload significantly and is a great option for those who do want to or canot run.