An electronic eyeglasses includes a camera module and a controller. The camera module captures consecutive images of eyes wearing the electronic eyeglasses. The controller includes a recognition module, a storage module, and a control module. The recognition module recognizes movement of the eyes by processing the consecutive images. The storage module stores an index table having a collection of eye movements and a collection of commands each of which is associated with one of the eye movements. The control module indexes a command from the index table using the movement of the eyes and controls the electronic eyeglasses to execute the command.