How can I make a penetration testing website? [closed]

I want to make an website in which you enter an url and does multiple simple penetration tests like a Ping Request but I can’t even do that. I made a notepad file, saved it as html and ran the code. The HTML part is all good but I cant do the Javascript part. It’s a school project and I’m very new with these. I don’t know if I need to use Apache or something else to interact with other websites so any help will do.

The code I have so far