Combined use of Javascript and select components in php

Source: Internet
Author: User
: This article mainly introduces the use of Javascript and select components in php. if you are interested in the PHP Tutorial, please refer to it.
// Use javascript and select components in combination
// In the process of writing a program, after selecting the select object option,
// You do not need to submit a button, but directly trigger the action.
// To keep the selected options on the page. Finally
// Use the onchange attribute and
// Value to implement this function.
// The code is as follows (the file name is "test. php "):


Switch ($ mon ){
Case '': echo 'select your Constellation:'; break;
Case '1': echo 'Your constellation is Aquarius '; break;
Case '2': echo 'Your constellation is Pisces '; break;
Case '3': echo 'Your constellation is Aries '; break;
Case '4': echo 'Your constellation is Taurus '; break;
Case '5': echo 'Your constellation is Gems'; break;
Case '6': echo 'Your constellation is Cancer '; break;
Case '7': echo 'Your constellation is Leo '; break;
Case '8': echo 'Your constellation is Virgo '; break;
Case '9': echo 'Your constellation is tianping'; break;
Case '10': echo 'Your constellation is Scorpio '; break;
Case '11': echo 'Your constellation is Sagittarius '; break;
Case '12': echo 'Your constellation is Capricorn '; break;
Default: break;
}
?>



The above describes the combined use of Javascript and select components in php, including the content, and hope to be helpful to friends who are interested in PHP tutorials.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.