JavaScript help

Hello everyone, 2 Part question.

What is the best way to import javascript I’m trying to port over a simple app

First would something like that work on Dfinity

second I have the HTML part working but would the script tags work like the image
Capture