PHP Code to subscribe email address
To get form data to java script we use different ways. We get data in jquery in different way using selector and in java script we use document.
Here are some ways to get form data to java script.
1  document.forms[0].name.value;
This above methods gets form on 0 index and its name field value
2  document.frmTest.name.value;
This methods gets value of name field of form frmTest.
3 var name = document.getElementById('name_id');
This method returns value of name field having id 'name_id'

 

Leave a Reply

Your email address will not be published. Required fields are marked *