It could work... If you want to set minimal system requirements to visit your website.
It will also annoy users of password managers with auto-filling capabilities. "password" is normally used for actual passwords.
Besides, nothing stops the attacker from replacing your code with a faster implementation.