<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Aubrière asso &#187; Tous les messages</title>
		<atom:link href="https://www.aubriereinfo.com/forums/forum/coding/javascript/feed/" rel="self" type="application/rss+xml" />
		<link>https://www.aubriereinfo.com/forums/forum/coding/javascript/feed/</link>
		<description></description>
		<pubDate>Thu, 16 Apr 2026 23:51:25 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.5.4-5380</generator>
		<language>fr-FR</language>

		
		
					
				<item>
					<guid>https://www.aubriereinfo.com/forums/topic/javascript-where-to/#post-228</guid>
					<title><![CDATA[JavaScript Where To]]></title>
					<link>https://www.aubriereinfo.com/forums/topic/javascript-where-to/#post-228</link>
					<pubDate>Thu, 08 May 2014 16:33:47 +0000</pubDate>
					<dc:creator>aubriere</dc:creator>

					<description>
						<![CDATA[
						<p>In HTML, JavaScripts must be inserted between &lt;script&gt; and &lt;/script&gt; tags.</p>
<p>JavaScripts can be put in the &lt;body&gt; and in the &lt;head&gt; section of an HTML page.</p>
<p>The &lt;script&gt; Tag<br />
To insert a JavaScript into an HTML page, use the &lt;script&gt; tag.</p>
<p>The &lt;script&gt; and &lt;/script&gt; tells where the JavaScript starts and ends.</p>
<p>The lines between &lt;script&gt; and &lt;/script&gt; contain the JavaScript code:</p>
<p>Example</p>
<pre>&lt;script&gt;
function myFunction() {
 document.getElementById("demo").innerHTML = "My First JavaScript Function";
}
&lt;/script&gt;
You don't have to understand the code above.</pre>
<p>Just take it for a fact, that the browser will interpret the code between the &lt;script&gt; and &lt;/script&gt; tags as JavaScript.</p>
<p>Note Old examples may have type=&nbsp;&raquo;text/javascript&nbsp;&raquo; in the &lt;script&gt; tag. This is no longer required.<br />
JavaScript is the default scripting language in all modern browsers and in HTML5.</p>
<p>JavaScript Functions and Events<br />
Often, JavaScript code is written to be executed when an event occurs, like when the user clicks a button.</p>
<p>JavaScript code inside a function, can be invoked later, when an event occurs.</p>
<p>Invoke a function = Call upon a function (ask for the code in the function to be executed).</p>
<p>You will learn much more about functions and events in later chapters.</p>
<p>JavaScript in &lt;head&gt; or &lt;body&gt;<br />
You can place any number of scripts in an HTML document.</p>
<p>Scripts can be placed in the &lt;body&gt; or in the &lt;head&gt; section of HTML, and/or in both.</p>
<p>Often you will see scripts at the bottom of the &lt;body&gt; section of a web page. This can reduce display time.</p>
<p>Sometimes you will see all JavaScript functions in the &lt;head&gt; section.</p>
<p>Anyway, separating HTML and JavaScript, by putting all the code in one place, is always a good habit.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

