Java Reference
In-Depth Information
Now if you open up the hero.htm file, fill in some form details about a superhero and sub-
mit it, you should receive a response from the Reqres website in the console similar to the
one that follows. It indicates that the data has been saved as the returned object with the ex-
tra properties id and createdAt that have been added by a database (in reality, the data
hasn't been saved, and these properties have just been added for demonstration purposes):
<< "{"name":"Superman","realName":"Clarke
"origin":"Born as Kal-El on the planet Krypton, before
being ...",
Most forms will have an action attribute that specifies the URL to use if the form is sent
without using Ajax. It will also have a method attribute that will specify the HTTP verb to
use. These methods are available as properties of the form object, so the open() method
can be generalized to work for any form as:, form.action, true);
Search WWH ::

Custom Search