Php drop-down box

Source: Internet
Author: User
Php drop-down box If (! Isset ($ _ GLOBAL_NEWS_QIKAN_TYPES )){
$ _ GLOBAL_NEWS_QIKAN_TYPES = array ('1' => 'precat ',
'2' => 'management column ',
'3' => 'R & D? Technology ',
'4' => 'market Express ',
'5' => 'beebot home ',
'6' => 'recommendation? Sharing ',
'7' => 'travel? Life'
);
}



$ Global_news_type_inc = array ();
$ Global_news_type_inc ['1'] = 'industry News ';
$ Global_news_type_inc ['2'] = 'Journal ';
?>
The above are two arrays. when I select a journal, what is the drop-down box of the above array? Please give me some advice. use php.


Reply to discussion (solution)

Js controls. first, set the select box above to the display: none attribute. Then, when the second select box selects a journal, set it to display: block.

Agree with the upstairs statement, add onclick in select, call js function for tag attribute processing, display setting disply: block otherwise dispau: none

This cannot be solved with PHP. JS can process pages dynamically, but PHP cannot. JS is also very easy. it can be done with two or three sentences...
Positive solution of the upstairs method ~
They are all new users and are taught!

Agree with the upstairs statement, add onclick in select, call js function for tag attribute processing, display setting disply: block otherwise dispau: none

Search on the Internet, and there are many examples of JS multi-level linkage...

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.