<label for="ice-cream-choice">Choose a flavor:</label>
<input list="ice-cream-flavors" id="ice-cream-choice" name="ice-cream-choice">
<datalist id="ice-cream-flavors">
<option value="Chocolate">
<option value="Coconut">
<option value="Mint">
<option value="Strawberry">
<option value="Vanilla">
</datalist>
<details>
<summary>Details</summary>
Something small enough to escape casual notice.
</details>
В папке проекта несколько html-файлов, может быть из-за этого?
Также, не выводится форма в массив NodeList при использовании querySelectorAll('forms')
Подскажите почему выводится undefined?
document.forms[0].name
[core]
editor = code --wait
[core]
editor = code --wait
[difftool "vscode"]
cmd = "code --wait --diff $LOCAL $REMOTE"
[merge]
tool = code-insiders
[mergetool "code-insiders"]
cmd = code-insiders --wait --merge $REMOTE $LOCAL $BASE $MERGED
interface RequestModel<T> extends Request {
body: T
}
class UserRegisterModel {
first_name: string;
last_name: string;
email: string;
password: string;
constructor({first_name}) {
this.first_name = firstname;
// И так все НУЖНЫЕ поля
}
}
app.post('/register', async (req: RequestModel<UserRegisterModel>, res) => {
if(req.body) {
const user = new UserRegisterModel(req.body);
// Хоба и лишних полей нет ))
}
});