JavaScripts


<SCRIPT LANGUAGE = "JavaScript">

<!--
var count = 0;
var doPolling;
function stopPolling(){
clearTimeout(doPolling)
}

function polling(){
doPolling = setTimeout("looking()",100)
}

function looking(){
document.form1.text1.blur()
theInput = document.form1.text1.value;
entered = theInput.length;
if(entered > count){
//keypress has occurred in text field
alert("Escribiste a:\n " + theInput.substring(count,entered + 1))
count++
}
document.form1.text1.focus()
polling()
}
// -->

</SCRIPT>
<FORM NAME = "form1">
<b>Escribe aquí</b>

<INPUT TYPE = "text" NAME = "text1" onFocus = "polling()" onBlur = "stopPolling()">
</FORM>

 

VOLVER