document.getElementById('sorry').getAttribute('type') returns "date" - Yes, because that's what the value of the attribute says, however, because IE6 doesn't know what a type="date" input element is, it falls back to "text".