Set Focus Cu Javascript
Last Updated: Jan 16 2007 01:00, Started by
fabby
, Oct 23 2005 14:09
·
0
#1
Posted 23 October 2005 - 14:09
am 2 input text-uri si vreau ca la primu, dupa ce dau enter, focusu sa fie pe al 2-lea input text..cum pot face asta?
multumesc anticipat! |
#2
Posted 23 October 2005 - 14:14
Dacă dai enter o să-ți facă submit la form.
Ca să dai focus la un control: document.getElementById('id_control').focus() |
#3
Posted 24 October 2005 - 12:38
fabby, on Oct 23 2005, 15:09, said: am 2 input text-uri si vreau ca la primu, dupa ce dau enter, focusu sa fie pe al 2-lea input text..cum pot face asta? multumesc anticipat! pui pe body: <body onkeydown="capture_keys()"> si in js: function capture_keys() { if (event.keyCode == 13) window.event.keyCode = 9 } |
#4
Posted 16 January 2007 - 01:00
daca am, sa zicem 10 campuri goale (input text), ca sa nu bag buton de submit la fiecare camp (de preferat sa nici nu existe acel buton), pot folosi tasta enter pentru salvare dar si sa se duca automat cursorul la urmatorul camp, se poate?
am incercat cu scriptul de mai sus, dar tot e ceva in neregula... Edited by kogaion0100, 16 January 2007 - 01:02. |
Anunturi
Bun venit pe Forumul Softpedia!
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users