Both will work but xhtml standard requires you to specify the type too:
charset %Charset; #IMPLIED -- char encoding of linked resource --
type %ContentType; #REQUIRED -- content type of script language --
src %URI; #IMPLIED -- URI for an external script --
defer (defer) #IMPLIED -- UA may defer execution of script --
>
type = content-type [CI]
This attribute specifies the scripting language of the element's
contents and overrides the default
scripting language. The scripting
language is specified as a content
type (e.g., "text/javascript").
Authors must supply a value for this
attribute. There is no default value
for this attribute.
Notices the emphasis above.
Note: As of HTML5 (far away), the type attribute is not required and is default.