An electronic device includes an attachment section which is attachable to a user, at least one contact detection sensor which detects whether the attachment section is attached to the user or is not attached to the user, a function section which executes at least one function, and a circuit section. The circuit section judges that the attachment section is in a non-attached state to the user based on a detection result of the contact detection sensor and controls the function section not to execute the function when the attachment section is judged to be in the non-attached state.