non mi funziona sto codice. dovrebbe dare un alert al onfocus sul textarea .... boh?
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento senza titolo</title>
<style type="text/css">
body {background: #FFCCCC}
textarea{
background: white;
height: 140px; width; 200px;
border: 1px solid #666;
padding: 2px;
}
</style>
<script type="text/javascript">
document.onload = function(){
var t_a = document.getElementById("shout");
t_a.onfocus = function(){
alert("ho preso il focus");
}
}
</script>
</head>
<body>
<form>
<textarea id="shout">ccc</textarea>
</form>
</body>
</html>