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 is mysqli_query?
What is T_PAAMAYIM_NEKUDOTAYIM?
What are the advantages of triggers in php?
What is psr in php?
hello all, I need some sample placement papers in lion bridge.. can anyone help me?
What are the rules to determine the “truth” of any value which is not already of the boolean type?
Why namespace is used in php?
Explain what does the unset() function means?
Tell me will a comparison of an integer 12 and a string "13" work in php?
Explain me what are the 3 scope levels available in php and how would you define them?
Does php support multiple inheritance?
Which is the dependent variable?
Is php easy language to learn?
What is __ construct in php?
What does the scope of variables means?