Home > Backend Development > PHP Tutorial > shellexecutehooks combines use of javascript and select components

shellexecutehooks combines use of javascript and select components

WBOY
Release: 2016-07-29 08:34:27
Original
1602 people have browsed it

//Combined use of Javascript and select components
//In the process of writing the program, I want to realize that after selecting the option in the select object,
//No need to submit the button, but directly trigger the action, and in the action After this happens
// the selected options should be kept on the page. After describing it, I finally realized this function by
//using Javascript and the onchange attribute of the select object and
//value.
//The code is as follows (the file name is "test.php"):
switch ($mon){
case '': echo 'Please select your zodiac sign:';break;
case '1':echo 'your Your zodiac sign is Aquarius';break;
case '2':echo 'Your zodiac sign is Pisces';break;
case '3':echo 'Your zodiac sign is Aries';break;
case '4':echo ' Your zodiac sign is Taurus';break;
case '5':echo 'Your zodiac sign is Gemini';break;
case '6':echo 'Your zodiac sign is Cancer';break;
case '7':echo 'Your zodiac sign is Leo';break;
 case '8':echo 'Your zodiac sign is Virgo';break;
 case '9':echo 'Your zodiac sign is Libra';break;
 case '10 ':echo 'Your zodiac sign is Scorpio';break;
 case '11':echo 'Your zodiac sign is Sagittarius';break;
 case '12':echo 'Your zodiac sign is Capricorn';break;
default:break;
? value">













[The copyright of this article is jointly owned by the author and Oso.com, if necessary When reprinting, please indicate the author and source]

The above introduces the use of shellexecutehooks on the combination of javascript and select components, including the content of shellexecutehooks. I hope it will be helpful to friends who are interested in PHP tutorials.


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template