[jQuery] how to get action attribute from form

[jQuery] how to get action attribute from form


Hi,
How do I get action attribute from the following form if I know id and
name values.
<form name="myForm" id="myForm" method="post" action="register.php"
onsubmit="return false;">
I tried those and it did not work:
$("form[name=myForm]").attr('action');
$("#myForm").attr('action');