I am new to javascript and I tried to change the type of a input using js.My work works well with Firefox and Chrome but not with IE.IE javascript debug mode says:

(SCRIPT256: Could not get the type property. This command is not supported. ).

This is the code I used to change the type.

var email_type=document.getElementById("email");

Please help me to debug this.