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 7.0 stable?
What's the difference between using mysql_ functions and pdo?
How do you check if an arraylist is empty?
How do I run php?
List few sensible functions in PHP?
Do while loops?
Tools used for drawing er diagrams?
Explain some most commonly use string functions in php?
How to add 301 redirects in PHP?
Write a program using while loop in php?
Tell me which programming language does php resemble to?
in PHP for pdf which library used?
How to execute an sql query? How to fetch its result?
Can a super () and this () keywords be in same constructor?
Write down the code for save an uploaded file using php?