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
What are the difference between overloading and overriding in oops?
Does php support multiple inheritances?
What is the difference between include and require?
What was the old name of php?
What is the delimiter syntax is PHP's default delimiter syntax
What distinguishes php from something like client side java script?
How to insert an new array element in array?
Where are sessions stored php?
Which of the delimiter is ASP style?
How to find the index of an element in an array php?
How to pass variables by references?
What is the difference between for and foreach in php?
What is difference between echo and print in php?
Are parent constructors called implicitly inside a class constructor?
What is $_ post in php?