Cod: Selectaţi tot
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide script from some browsers
function toUpper(item)
{ str=item.value;
item.value=str.toUpperCase();
}
// end script hiding from some browsers -->
</SCRIPT>
</head>
<body>
<form>
<input type=text OnChange="alert('onChange!')" onKeyUp="javascript:{toUpper(this);alert('onkeyup!');}">
<input type=text >
</form>
</body>
</html>interesant este ca daca fac asa:
Cod: Selectaţi tot
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide script from some browsers
function toUpper(item)
{ str=item.value;
item.value=str.toUpperCase();
}
// end script hiding from some browsers -->
</SCRIPT>
</head>
<body>
<form>
<input type=text OnChange="alert('onChange!')" onKeyUp="javascript:{this.value.toUpperCase();alert('onkeyup!');}">
<input type=text >
</form>
</body>
</html>vad alerta pusa pe onChange. Cum se explica oare?