I would first check to see if the file is showing up in your web browser correctly:
Right-click in browser window, choose "View Page Source (if you're using chrome)," navigate to the tag, find the link to your javascript file and click on it. You should see the contents of it display in your window.
If the code looks right, you might have an error in it. The browser developer tools (right-click browser window, select "Inspect Element") will sometimes display those errors in the "Console" tab.
The code seems fine. Here's a snippet for it:
function firstmethod()
{
alert("Enter a New Number");
return true;
}
<form name="firstform" method="post" action="first" onsubmit="return firstmethod()">
<input type="submit" name="button" value="Click" />
</form>