Olá,
1º Por favor analise meu codigo, JAVASCRIPT E HTML tudo separadinho.
2º Estou praticando localmente usando easyphp (LOCALHOST).
3º Firefox, crome, e o IE carregam perfeitamente o HTML, o javascript e o CSS.
4º O firebug não apresenta nenhum erro.
5º Aguardo uma ajuda pois o codigo não executa.
//Aqui esta o script bunitinho perfeito chamando o cara la no html, mas ... mas ... :(
window.onLoad = function(){
document.getElementById("l").onclick = function() {
alert("teste");
}
}
function teste(){
alert("teste");
}
<!doctype html>
<html lang= "pt-br">
<head> <meta charset="iso-8859-1"><title>aulas</title>
//CHAMADA DO JAVASCRIPT
<script type="text/javascript" src="js/javascript.js" ></script>
//CHAMADA DO CSS
<link href="css/layout.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
</div>
<div id="contents">
<h3>Funçoes</h3>
<ul>
<li>declarativa</li>
<li>anonima</li>
<li id="l">literal</li> //ESTOU CHAMANDO ESTE ID NO CODIGO JAVASCRIPT MAS ELE NAO FUNCIONA!!!!!!!!!
</ul>
</div>
</body>
</html>