https://learn.microsoft.com/ja-jp/dotnet/csharp/tour-of-csharp/tutorials/hello-world?tutorial-step=1
ここでフォーカスモードを開始するとブラウザ上でC#が動くがこれ多分Blazorだな
JavaScriptじゃちょっと無理だと思う