/    Sign up×
Community /Pin to ProfileBookmark

correct <script> tags to use – easy question

Hi,

This is a simple question i hope you can help me with.

How should you introduce your javascript. I have seen the examples below and am curious to know the best way and the most frequently used way.

<script language=”javascript”>

<script type=”text/javascript”>

<script language=”javascript” type=”text/javascript”>

thanks.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliJun 06.2003 — These are the current standard compliant script tags

<script type="text/javascript">

</script>
Copy linkTweet thisAlerts:
@jsladyauthorJun 06.2003 — cheers Khalid.
Copy linkTweet thisAlerts:
@CharlesJun 06.2003 — [font=georgia]If you use or add a [font=monospace]language="JavaScript"[/font] then Netscape will use a non-standard [font=monospace]Array.toString()[/font] method. You'll wonder why your script works fine in every other browser so it's best to avoid that depricated attribute.[/font]
×

Success!

Help @jslady spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...