Input Email name attribute
Definition and Usage
name
Set or return the value of the name attribute of the email field.
The HTML name attribute is used to identify form data after the form data is submitted to the server, or to reference form data on the client using JavaScript.
Note:Only form elements that have a name attribute will pass their values when the form is submitted.
See also:
HTML Reference Manual:HTML <input> name ƙarantawa
Example
Example 1
Get the name of the email field:
var x = document.getElementById("myEmail").name;
Example 2
Change the name of the email field:
document.getElementById("myEmail").name = "newEmailName";
Syntax
Return name attribute:
emailObject.name
Dabara name ƙaranta:
emailObject.name = name
Wuri ƙaranta
Wuri | Ba'a cikin |
---|---|
name | Dabara sunan ƙarantun ƙanam. |
Tsunan ƙaranta
Dakin: | Tsarin kalmomi, wanda ke nufin sunan ƙarantun ƙanam. |
---|
Tallafi ƙanam
Tsunan da ke tabbatar da sabon taron ƙanam a cikin kwanan nan.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Tallafi | 10.0 | Tallafi | Tallafi | Tallafi |