|
发表于 2017-12-20 11:16:45
|
显示全部楼层
//类型字段ID,根据具体实际情况进行修改
var type = "field12191";
//页面加载事件
jQuery(document).ready(function(){
//集体/个人绑定事件
jQuery("#"+type).bind('change',function(){
trDisplay();
});
trDisplay();
});
//TR显隐事件
function trDisplay(){
var type_v = jQuery("#"+type).val();
if(type_v == '0'){//价格差异导致的差额
jQuery("TR[ID=TR_ZL]").hide();
jQuery("TR[ID=TR_ZLZB]").hide();
jQuery("TR[ID=TR_XSZB]").show();
jQuery("TR[ID=TR_FZL]").show();
jQuery("TR[ID=TR_Group]").hide();
jQuery("TR[ID=TR_FJSC]").hide();
}else if(type_v == '1') {
jQuery("TR[ID=TR_ZL]").show();
jQuery("TR[ID=TR_FZL]").hide();
jQuery("TR[ID=TR_Group]").show();
jQuery("TR[ID=TR_XSZB]").hide();
jQuery("TR[ID=TR_ZLZB]").show();
jQuery("TR[ID=TR_FJSC]").show();
}else if(type_v == '2') {
jQuery("TR[ID=TR_ZL]").hide();
jQuery("TR[ID=TR_FZL]").show();
jQuery("TR[ID=TR_Group]").hide();
jQuery("TR[ID=TR_ZLZB]").hide();
jQuery("TR[ID=TR_XSZB]").show();
jQuery("TR[ID=TR_FJSC]").hide();
}else{
jQuery("TR[ID=TR_ZL]").hide();
jQuery("TR[ID=TR_FZL]").hide();
jQuery("TR[ID=TR_Group]").hide();
jQuery("TR[ID=TR_ZLZB]").hide();
jQuery("TR[ID=TR_XSZB]").hide();
jQuery("TR[ID=TR_FJSC]").hide();
}
}
|
|