How do i get the type attribute when adding javascript to drupal?
On the off-chance that you're using an HTML5 DOCTYPE, you don't need to worry:


  The type attribute gives the language of the script or format of the data. If the attribute is present, its value must be a valid MIME type. The charset parameter must not be specified. The default, which is used if the attribute is absent, is "text/javascript".


Emphasis mine

Source: HTML 5.1 Nightly - 4.3 Scripting