Bug Tracker

Opened 7 years ago

Closed 7 years ago

#12998 closed bug (notabug)

$('input').attr('tagName') !== 'INPUT'

Reported by: subchen@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.3
Keywords: Cc:
Blocked by: Blocking:

Description

I can't get the expected tagName of input (IE10, Firefox17, Chrome23, jQuery 1.6.2)

<input type="button" id="testInput" value="click me" onclick="show(this)" />

<script type="text/javascript"> function show(obj){

alert($(obj).attr("tagName"));

} </script>

Change History (1)

comment:1 Changed 7 years ago by dmethvin

Resolution: notabug
Status: newclosed

There is no tagName attribute on that element. There is a type, id, value, and onclick attribute. I think you wanted .prop() but ask on the forum.

Note: See TracTickets for help on using tickets.