Visualizzazione dei risultati da 1 a 2 su 2

Discussione: effetto tab

  1. #1

    effetto tab

    come ottengo l'effetto tab premendo un altro tasto?

    ho un form con degli indirizzi ip da compilare: una textbox per ogni ottetto.
    il tizio che lo compila vorrebbe potersi spostare da un campo all'altro con il punto anziche' col tab, perche' digitando ogni giorno tanti indirizzi ip gli viene spontaneo schiacciare il punto.

    please, help me!
    non so proprio come spostare il focus sulla pressione di un tasto!
    Success in life is a matter not so much of talent and opportunity as of concentration and perseverance.

  2. #2
    provato così?

    codice:
    <form name="form1">
    <input type="text" onKeyPress="if (event.keyCode==46) this.form.campo2.focus();" name="campo1" maxlength="3" size="3">
    <input type="text" onKeyPress="if (event.keyCode==46) this.form.campo3.focus();" name="campo2" onFocus="if (this.value=='.') this.value='';" maxlength="3" size="3">
    <input type="text" onKeyPress="if (event.keyCode==46) this.form.campo4.focus();" name="campo3" onFocus="if (this.value=='.') this.value='';" maxlength="3" size="3">
    <input type="text" name="campo4" maxlength="3" size="3" onFocus="if (this.value=='.') this.value='';" maxlength="3" size="3">
    </form>
    ciao

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.