.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Melody Anderson
Eminent IT

Home >> Code Snippets >> Javascript >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Clear web control value in one button click Using Javascript

Posted By:Pankaj Mishra       Posted Date: August 09, 2008    Points: 10    Category: Javascript    URL: http://www.dotnetspark.com  

Hi ,
Some times we require to clear the control status at one click for our web application. Using javascript its very easy.you can clear the control status

for example(TextBox/Input)

function ClearTextBoxExample()
     var loTextBox = document.forms[0].elements;
    for(var i=0;i< loTextBox.length; i++)
               loTextBox[i].value = ""; 



Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend