日期:2014-05-16 浏览次数:20390 次
<script> //自动判断文本框中的值,并进行组装 function getJiaoKuanR(target){ if(target.checked){ if(isEndWith($("#jiaoKuanR").val(),",") || $("#jiaoKuanR").val() == ""){ $("#jiaoKuanR").val($("#jiaoKuanR").val() + target.value ); }else { $("#jiaoKuanR").val($("#jiaoKuanR").val() + "," + target.value ); } }else{ $("#jiaoKuanR").val($("#jiaoKuanR").val().replace("," + target.value,"")); $("#jiaoKuanR").val($("#jiaoKuanR").val().replace(target.value + ",","")); $("#jiaoKuanR").val($("#jiaoKuanR").val().replace(target.value,"")); } } </script>