php下拉框的

WBOY
Release: 2016-06-23 14:05:57
Original
1579 people have browsed it

if(!isset($_GLOBAL_NEWS_QIKAN_TYPES)){
$_GLOBAL_NEWS_QIKAN_TYPES=array('1'=>'卷首语',
'2'=>'管理层专栏',
        '3'=>'研发?技术',
'4'=>'市场速递',
'5'=>'小蜜蜂家园',
        '6'=>'推荐?分享',
'7'=>'旅行?生活'
);
}



$global_news_type_inc =array();
$global_news_type_inc['1']='行业新闻';
$global_news_type_inc['2']='期刊';
?>
以上是2个数组的,然后在当我选择期刊的时候,出现上面那数组的下拉框?求大神指点,用php哦


回复讨论(解决方案)

js控制了,先把上面那个select框设置display:none 属性。然后当第二个select框选择期刊时设置它为display:block 就可以了

同意楼上说法,在select中添加onclick,调用js函数进行标签的属性处理,显示设置disply:block否则dispau:none

这用PHP真没法解决,JS可以动态处理页面,而PHP没办法,而且JS也很容易,两三句就搞定了...
楼上方法正解~
都是新手,受教了!

同意楼上说法,在select中添加onclick,调用js函数进行标签的属性处理,显示设置disply:block否则dispau:none

网上搜一下,JS多级联动,有很多例子。。。

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!