Jquery change

Java replaceFirst

private static String strUtil(String str)
    {
        String newStr2 = "";
        if (null != str)
        {
            String []newStr = str.split(",");
            for (int i=0; i<newStr.length; i++)
            {
                newStr2 = newStr2 + "," + newStr[i];
            }
            newStr2 = newStr2.replaceFirst(",", "");
        }
        return newStr2;
    }


$('#typeSelect').change(function(){

if(this.value == 1){
return;
}else{
if(this.value == 2){
$('#serverHost').show();

$('#processorFamily').hide();
$('#cpuCoreSpeed').hide();
}else{
$('#serverPlatom').show();

//$('#modelTxt').removeAttr("required");
document.getElementById("modelTxt").required=false;
$('#modelTxt').hide();
$('#modelTxt').attr("disabled","disabled");

//$('#modelSelect').attr("disabled","false");
document.getElementById("modelSelect").disabled=false;
//$('#modelSelect').change().show();
$('#modelSelect').show();

/*
$('#processorFamily').attr("readonly","readonly");
$('#cpuCores').attr("readonly","readonly");
$('#cpuCoreSpeed').attr("readonly","readonly");
$('#memory').attr("readonly","readonly");
$('#os').attr("readonly","readonly");
*/
}
}
    [b] }).change();[/b]

你可能感兴趣的:(jquery)