Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

display selected value in dropdown list through javascript
without page refresh

Answer Posted / dhir

<html>
<body>

<script type="text/javascript">
var show
function showSelected()
{
show
=document.me.test.options[document.me.test.selectedIndex].value;

document.write(show);
}
</script>
<form name="me">
<select name='test' onChange='showSelected()'>
<option value='1'>one</option>
<option value='2'>two</option>
</select>
</form>
</body>
</html>

Is This Answer Correct ?    169 Yes 102 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When you want to show some part of a text displayed on an html page in red font color? What different possibilities are there to do this? What are the advantages/disadvantages of these methods?

939


How can we define a variable accessible in functions of a php script?

1032


What is the method to register a variable into a session?

895


What is the function mysql_pconnect() usefull for?

1178


When do you use define() and when do you use const. What are the main differences between those two?

1109


What is php dependency injection?

979


How can you declare a constant variable in php?

1075


What are the methods to submit form in php?

1048


What is difference between post and put in rest?

1067


Explain about the data types in PHP?

1027


Can php replace javascript?

1058


What is composer install?

1113


What are default session time and path?

1195


How to randomly retrieve a value from an array?

1160


Tell me how can we determine whether a variable is set?

958