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
Tell me how do I escape data before storing it into the database?
How to delete a file from the system?
How can I convert ereg expressions to preg in php?
When to use inquire vs enquire?
Do loops php?
Explain what is meant by pear in php?
What are access specifiers?
How you can update memcached when you make changes to php?
What is the tags in PHP is not a valid way to begin and end a PHP code block?
What are php keywords?
What is the function file_get_contents() usefull for?
What is the use of mysqli_real_escape_string() function?
What is $globals php?
Is php a mvc?
How many types of inheritances used in php and how we achieve it.