ip属性共用值提取为一个全局的函数,当initCommIpVal执行的时候初始化ipcommon的属性,并且初始化完成之后将页面无用的select
option直接remove
This commit is contained in:
@@ -67,10 +67,14 @@
|
||||
}
|
||||
//处理ICMP
|
||||
if($(this).val()==32){
|
||||
tabInfo.find("select[name$='protocol'] option[value='1']").removeAttr("disabled");
|
||||
$.ipcommon.protocol.each(function(){
|
||||
if($(this).attr("value")==1){
|
||||
tabInfo.find("select[name$='protocol']").append($(this));
|
||||
}
|
||||
})
|
||||
tabInfo.find("select[name$='protocol']").selectpicker("refresh");
|
||||
}else{
|
||||
tabInfo.find("select[name$='protocol'] option[value='1']").attr("disabled",true);
|
||||
tabInfo.find("select[name$='protocol'] option[value='1']").remove();
|
||||
tabInfo.find("select[name$='protocol']").selectpicker("refresh");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user