This is my html: <form id="myForm" action=""> <input type="text" id="a" /> </form> and javascript: <script type="text/javascript> $(document).ready(function() { var form = $('#a').attr('form'); alert(form.attr('action')); }); </script> it works in IE 7.0, but in FF form is 'undefined', I can get the form using var form = $('#a').get(0).form;
so why attr('form') does not work in firefox?