Message from JavaScript discussions

May 2019

— Not ('#form')


This selects the first form on the website. if there are multiple forms, this is probably not what you want.

— Depends

— Except, it you select of another parent, that this might work as expected

— E.g. document.querySelector('#sign-in').querySelector('form')

— I find another solution and got the answer

— These can be merged:
document.querySelector('#sign-in form')

— Or > for direct child

— Use the "getElementById" method for id selectors

— I used it and worked

— When sending request to backend it does not send without alert in the request function

— Why it happens