For security reason, some browsers such as IE don't allow modifying input type on the fly. Code snippet #1 won't know. In case you know exactly what you are doing and really want to modify the type dynamically for any good reasons. Here is a way to do so (see code snippet #2).
Code #1 -
doesn't work in most of the browsers
Code #2 - works
No comments:
Post a Comment