Both ways works fine!

Please:
1- check the link to jquery library in the document ,
2- don't forget to wrapper the script within ready() method,
3- double check the script and markup sintax.

Maurício

-----Mensagem Original----- De: "bob" <xoxeo...@gmail.com>
Para: "jQuery (English)" <jquery-en@googlegroups.com>
Enviada em: terça-feira, 3 de fevereiro de 2009 19:53
Assunto: [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');

Reply via email to