$(function() {
//隐藏div
$("#shouhou2").hide();
$("#shouhou2").hide();
$("#shouhou3").hide();
//给div添加change事件
$("#type").change(function() {
if($(this).val() == 1 ) {
// $("#shouhou1").show();
// $("#shouhou2").hide();
// $("#shouhou3").hide();
} else if($(this).val() == 2 ) {
$("#shouhou2").show();
$("#shouhou1").hide();
$("#shouhou3").hide();
}
else if($(this).val() == 3 ) {
// $("#shouhou3").show();
// $("#shouhou1").hide();
// $("#shouhou2").hide();
}
})
})
表格
折线图
柱状图
表格区域
折线图区域
柱状图区域
标签:hide,val,shouhou3,shouhou2,show,shouhou1,html,query,下拉框
来源: https://www.cnblogs.com/ayanboke/p/11492760.html