As per HTML4 specification, it won't be a valid markup only as per W3C Validator if you remove type attribute from the tag although your script should still work fine across browsers.
If you are asking in HTML5 perspective, there is no problem in leaving that out.