Show value of form element by Javascript

Hello Friends,
Now I am showing how to show value of form element by javascript. Its a very simple example for beganner. Lets start.

<form name=”aa”>

<input type=”text” size=”10″ value=”” name=”bb”><br> <input type=”button” value=”Click Here”onclick=”alert(document.aa.bb.value)”>

</form>

Here it is important that, we gave the names to the form and the element. So JavaScript can gain access to them.

Thanks for reading….

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s