script inline js code example
Example 1: html inline javascript
/*
There is no actual way to put javascript inside an HTML attribute
But there are some event attribute that can trigger JavaScript
functions.
Otherwise you have to use <script> tag or external JavaScript
*/
Example 2: how to use inline javascript in html
<input type="text" id="fname"
onkeyup="javascript:{console.log(window.event.key); alert('hello');}"
>