0218 weekend Flashcards
1
Q
the <textarea> tag does NOT support which attribute?</textarea>
A
the “value” attribute
e.g. <textarea> is not supported and u can't do this:
$textInputField.setAttribute('value', data.editing.url);
or
$urlInputField.setAttribute('value', 'some notes');</textarea>
to set the value just use .value directly, like this
$notesInputField.value = data.editing.notes;
or
$notesInputField.value = ‘some notes’;
2
Q
how do you convert a string number to a number?
A
use the number method (capitalize “Number”)
e.g.
var days = ‘20’;
Number(days)
it will render the number 20