DHTML: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Riga 20:
Tramite il DHTML è possibile fare cambiare lo stile CSS di un oggetto in modo dinamico. Ad esempio
<code>
<p>&lt;html&gt;<br />
<HTML>
&lt;head&gt;&lt;title&gt;DHTML Test&lt;/title&gt;<br />
<HEAD><TITLE>Dynamic Styles</TITLE>
&lt;script&gt;function changeAll() { document.getElementById('div1').style.color = 'blue'; }&lt;/script&gt;<br />
<SCRIPT LANGUAGE="JScript">
&lt;/head&gt;<br />
function doChanges() {
&lt;body&gt;<br />
window.event.srcElement.style.color = "green";
&lt;div id=&quot;div1&quot; style=&quot;color: red;&quot; onmouseover=&quot;changeAll()&quot;&gt;Benvenuti Nel test di DHTML!&lt;/div&gt;<br />
window.event.srcElement.style.fontSize = "20px";
&lt;/body&gt;<br />
}
&lt;/html&gt;</p>
</SCRIPT>
</HEAD>
<BODY>
<!-- Substitute xxx with DIV -->
<div id="heading" onmouseover="doChanges()" STYLE="color:black;font-size:18">Welcome to Dynamic HTML!
You can do the most amazing things with the least bit of effort.
</div>
</BODY>
</HTML>
</code>