Sunday, August 5, 2007

Dynamically Increase The Size Of The TextBox Using JavaScript

function incr()
var len = document.getElementById('txt').value;
document.getElementById('txt').style.width = 75+len.length*4+'px';
<input type='text' id='txt' onkeydown='incr()' style='width:75px' />

No comments:

Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.