I think it would be better if you can do that in aspx itself insted of going for javascript. Its much more easier coding in C# or
VB.Net that in javascript. Moreover in case you want to do that in JavaScript, you may need to use DHTML which may not be supported by all browsers
Regards
Ganesh