1、需求
当单选按钮“安全介入”选中第1个值时,显示“安全报告路径”字段输入框。
2、解决方案
在目标字段即“安全报告路径”字段的描述中添加如下代码
<script>jQuery(document).ready(function() {
jQuery("input[name=customfield_11420]").each(function(){
jQuery(this).click(function(){
var discount = jQuery(this).val();
if(discount=="11037"){
jQuery("input[name='customfield_11421']").val('无');
jQuery("input[name='customfield_11421']").parent().hide();
}
if(discount=="11036"){
jQuery("input[name='customfield_11421']").val('');
jQuery("input[name='customfield_11421']").parent().show();
}
});
});
});</script>
效果如下图所示