In this form of code, what is the role of the attribute name=""?
name=""
name="s"and name="submit".
name="s"
name="submit"
Do I need to add?
<form action="/index.php" method="get"> <fieldset> <legend>Search</legend> <label for="s"><span>Search WaSP</span> <input value="" name="s" id="s"></label> <input type="submit" value="Go!" name="submit" > </fieldset> </form>
In the request form
name
id
With the namerequest will look like
/index.php?s=&submit=Go!
Without a namerequest, it will look like
/index.php
This is what is actually sent to the server, like a name in the usual submit form.
. StackOverflow -, , , -.
GET /x -www-form-urlencoded POST (name = value).
This is how they are represented in the DOM.
document.forms [0] .s.value
Source: https://habr.com/ru/post/1746817/More articles:In Ruby, what is a good way to filter all the methods of an object that contain the word "time" in it? - arraysDealing with undefined values in code or in a template? - language-agnosticAI противник автомобиля логики в автомобильной гонки - artificial-intelligenceC question: error: expected ')' before '*' token - cHow to Transfer Existing iPhone Application to iPad - iphoneAT command to retry the SIM contact - modemJQuery UI tab for _blank web page - jquerywhich inotify event signals the completion of a large file operation? - pythonWhy is it necessary to reset the browser? - cssLaunch GTK + application in client browser - web-applicationsAll Articles