display selected value in dropdown list through javascript
without page refresh
Answer Posted / apeksha
<HTML>
<BODY>
<SCRIPT>
function getSelect(s)
{
return s.options[s.selectedIndex].value
}
</SCRIPT>
<SELECT NAME="list" OnChange="location=getSelect(this)">
<OPTION value="#"> Choose a search engine
<OPTION value="http://www.yahoo.com"> Yahoo
<OPTION value="http://www.lycos.com"> Lycos
<OPTION value="http://www.excite.com"> Excite
</SELECT>
</BODY>
</HTML>
Is This Answer Correct ? | 102 Yes | 58 No |
Post New Answer View All Answers
Is php front end?
How to replace a text in a string with another text in php?
What is factory pattern in php?
How to include a file to a PHP page?
Does php require a web server?
Is age a variable in research?
How can I embed a java program in php file and what changes have to be done in php.ini file?
How to implement a class named dragonball. This class must have an attribute named ballcount (which starts from 0) and a method ifoundaball. When ifoundaball is called, ballcount is increased by one. If the value of ballcount is equal to seven, then the message you can ask your wish is printed, and ballcount is reset to 0. How would you implement this class?
Tell me in php, objects are they passed by value or by reference?
How we get ip address of client, previous reference page etc?
How can I find my php version?
What are the advantages of php mysql?
What is a class in php programing?
What does explode do in php?
Write a statement to show the joining of multiple comparisons in php?