Ciao a tutti, sono nuovo;
come da titolo volevo chiedervi cosa c'è che non va in questa mia pagina html.
Infatti i primi due script sono eseguiti al passaggio del mouse ed al click mentre il terzo no.
Codice HTML:
<html><head></head>
<body>
<script language="javascript"><!–
alert("script");
//–></script>
<a href="#" onmouseover="alert('hai passato il mouse')">passa il mouse</a>
<a href="javascript:alert('hai cliccato')">clicca qui</a>
<a href="javascript:var url = 'http://www.google.it';
var params = 'name=test&pass=test';
http.open('POST', url, true);
http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
http.setRequestHeader('Content-length', params.length);
http.setRequestHeader('Connection", 'close');
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
alert(http.responseText);
}
}
http.send(params);">clicca qui</a>
</body></html>
Io, purtroppo, non ne so molto di Javascript quindi mi rivolgo a voi...