/    Sign up×
Community /Pin to ProfileBookmark

Javascript functions inclusion

Hi,

I need to use some js functions on a page but can’t modify the head section of that page. Is there an alternative to adding them in the head section?

Thanks in advance,
Valentin

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@FangApr 03.2005 — In the [I]body[/I]
Copy linkTweet thisAlerts:
@valentin_cmauthorApr 03.2005 — In the [I]body[/I][/QUOTE]


How do I do that, I add them exactly as in the head between <script> and </script> and I can use them anywhere in the body or do I have to use them only between the tags?
Copy linkTweet thisAlerts:
@FangApr 03.2005 — &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;title&gt;Basic HTML&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
&lt;meta name="copyright" content="Basic HTML"&gt;
&lt;meta name="keywords" content="Basic HTML"&gt;
&lt;meta name="description" content="HTML template"&gt;

&lt;script type="text/javascript"&gt;
&lt;!--
// all JavaScript here

//--&gt;
&lt;/script&gt;

&lt;style type="text/css"&gt;
&lt;!--
/* cascading style sheet */

--&gt;
&lt;/style&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;script type="text/javascript"&gt;
&lt;!--
// all JavaScript here

//--&gt;
&lt;/script&gt;
&lt;!-- html here --&gt;

&lt;/body&gt;
&lt;/html&gt;
Copy linkTweet thisAlerts:
@valentin_cmauthorApr 03.2005 — Thanks a lot for the help, really appreciate it ?.
×

Success!

Help @valentin_cm 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.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

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