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
How do you end php?
What is framework? How it works? What is advantage?
How do you define a constant?
What is isset php?
What is pdo classes?
Is php an api?
How do sessions work in php?
How can i execute PHP File using Command Line?
What is a lambda function in php?
Tell me how to create a session? How to set a value in session? How to remove data from a session?
Name some of the popular frameworks in php.
How can we submit form without a submit button?
What is csrf token and how will you add csrf token in ajax?
What is the use of 'print' in php?
What's the difference between using mysql_ functions and pdo?