Visitar URL original
a form has access to its inputs with name by Haroenv · Pull Request #9 · wesbos/JavaScript30 · GitHub
Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
a form has access to its inputs with name
another option is using this.elements['item'], since then you can't have the attribute 'item' of the form'
  • Loading branch information
Haroenv committed Dec 9, 2016
commit 72e8e8348253f48d9a5bd9502aff4b3115ec5a9b
2 changes: 1 addition & 1 deletion 15 - LocalStorage/index-FINISHED.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h2>LOCAL TAPAS</h2>

function addItem(e) {
e.preventDefault();
const text = (this.querySelector('[name=item]')).value;
const text = this.item.value;
const item = {
text,
done: false
Expand Down