I have a textbox ,i want whenever user start entering a number in that texbox the previous value should be remove.
Let say there is a textbox which contain a number as 23 ,i want whenever user start typing in that same textbox 23 shold be remove and new enetered number should be shown.
My code as follow
document.getElementById("mytextbox").select();
$("#mytextbox").select();
<input type="text" onclick="clear();">
But still my code is not working,i am using ie9 ,window 7 64 bit pc,i debug the code and did quickwatch to this line
document.getElementById("mytextbox").select()
it is showing me undefined.,I am able to find the mytextbox.
Is there any other way to do this.My code is working in chrome and mozilla.