Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> JavaScript >> Snippet

Prevent user from changing value of element


Use the onfocus event in the element tag to prevent shift focus away from the element

< input type = 'text' name = 'myinput' onfocus = "document.nextelement.focus()" >