Javascript for MySQL

How do I use mysql commands in javascript language and auto appear them
in my html layout? I already know some basic javascript commands but I
am trying to incorporate sql commands but it won’t work. Is there a way
to do it?