The control used for entry and exit in the type browser (for example, type=text, this is a text box; type=button, this is a button)
The optional value of type is as follows:
button button
checkbox checkbox checkbutton component
file file upload component
hidden hidden domain
image image area
password password input text box
radio radio button component
reset form button
submit form button
text text input box
***************************************************************************
Id is a unique identifier, and duplicate values are not allowed (similar to the primary key of a data table, pk). The corresponding html tag object can be obtained through its value. (If a duplicate id appears in the same page code, it will cause unpredictable errors)
js code: document.getElementById(id_value)
Get its object reference based on the specified id
***************************************************************************
The function of name and id is the same, and is also used to identify the html tag, but the only difference is that name allows duplicate values.
js code: document.forms[0].name or document.getElementsByName(name)
Get its object reference array based on the specified name
***************************************************************************
value represents the value of a certain html tag
For example: <input type=text name=seq value=hello! id=seq007 />
You will see the content of the text box in the web page as hello!
///////////////////////////////////////////////////////////////////////
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd>
<html>
<head>
<meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 />
<title>Untitled Document</title>
<script>
</script>
</head>
<body>
<form>
<input type=text name=seq value= id=seq001 />
<input type=text name=seq value= id=seq002 />
<input type=text name=seq value= id=seq003 />
</form>
</body>
</html>
///////////////////////////////////////////////////////////////////////
document.getElementById(seq001) obtains a reference to the object tag with id=seq001
document.forms[0].seq
It will return the array of references to all the name=seq tag objects in the first form in the web page.
document.getElementsByName(seq)
Will return all tag object reference arrays with name=seq in the web page