I'm trying to change the HTML5 input tag from text to date using JavaScript, the markup really changed.. but the IE Still allow user to type any characters or number. after giving up I tried to insert new element but same result!!
getting div:
<div id="myDiv">
</div>
var obj = document.getElementById("myDiv");
insert new input elemnt:
var DataType ="date";
var inputStr = "<input type='" + DataType + "' class='input-lg'/>";
obj.innerHTML = inputStr;
I tried the solution on change html input type by JS? and I got an error when changing type:
<script type="text/javascript">
document.getElementById('hybrid').type = 'password';
</script>
Any one can help?