Così è un po' più leggibile
codice:<html> <body bgcolor="#BEF781" vlink="#0000FF"> <center>Digitare le prime tre lettere:</center><br> <script> function searchForText(toFind, frameToSearch) { if (!toFind) { window.alert('You have not entered any text to search for'); return } if (frameToSearch.focus) { frameToSearch.focus() } if (window.find) { if (document.layers) { var ifFound = frameToSearch.find(toFind, !1, !1) } else { var ifFound = frameToSearch.find(toFind, !1, !1, !0, !1, !0, !1) } } else if (frameToSearch.document.body && frameToSearch.document.body.createTextRange) { if (frameToSearch.document.selection && frameToSearch.document.selection.type != 'None') { var theRange = frameToSearch.document.selection.createRange(); theRange.collapse(!1) } else { var theRange = frameToSearch.document.body.createTextRange() } var ifFound = theRange.findText(toFind); if (ifFound) { theRange.select() } } else { alert('Please use your browser\'s search facility') } if (!ifFound) { alert('Could not find text:\n' + toFind) } }; </script> <div align=center> <script> if ((document.body && document.body.createTextRange) || window.find) { document.write('<form action="" onkeyup="if ( this.elements[0].value.length >2 ){searchForText( this.elements[0].value, window );}">' + '<input style="text-align:center" id="tre" autofocus="autofocus" type="text" onclick="this.value=null" maxlength="3" size="3"> </form>'); } if (!("autofocus" in document.createElement("input"))) { document.getElementById("tre").focus(); } </script> </div> <center><br><br> <a href="http://google.com" class="text">GOOGLE</a><br><br> <a href="http://youtube.com" class="text">YOUTUBE</a><br><br> <a href="http://facebook.com" class="text">FACEBOOK</a><br><br> <a href="http://twitter.com" class="text">TWITTER</a><br><br> <a href="http://eccetera.com" class="text">ecc. ecc....</a><br><br> </center> </body> </html>


Rispondi quotando