• 单选和输入框,点击单选按钮高亮文本框


    • $("input:radio[name='p_pricetype']").click(function(){
              var val=$('input:radio[name="p_pricetype"]:checked').val();
              if(val==1){
                  $("input[name='p_spot']").removeAttr("disabled");
                  $("input[name='p_spot']").focus();
                  $("input[name='p_spot']").blur(function(){
                      var p_spot = $("input[name='p_spot']").val();
                      if(p_spot!=null){
                          if(Number(p_spot)<0&&(!isNaN(p_spot))){
                              alert('对不起,下浮点数应该大于0!');
                          }
                          if(isNaN(p_spot)){
                              alert('请输入数字。');
                          }
                      }
                  });
              }
              if(val==2){
                  $("input[name='reduceprice']").removeAttr("disabled");
                  $("input[name='reduceprice']").focus();
                  $("input[name='reduceprice']").blur(function(){
                      var reduceprice = $("input[name='reduceprice']").val();
                      if(reduceprice!=null){
                          if(Number(reduceprice)<0&&(!isNaN(reduceprice))){
                              alert('对不起,优惠金额应该大于0!');
                          }
                          if(isNaN(reduceprice)){
                              alert('请输入数字。');
                          }
                      }
                  });
              }
              if(val==3){
                  $("input[name='addprice']").removeAttr("disabled");
                  $("input[name='addprice']").focus();
              }
              /*if(val==4){
                  alert('111')
                  //$("input[name='zhiprice']").removeAttr("disabled");
                  $("input[name='zhiprice']").focus();
              }*/
              if(val==5){
                  $("input[name='p_upspot']").removeAttr("disabled");
                  $("input[name='p_upspot']").focus();
              }
          });
      checked<{elseif $cars.p_pricetype==4}>disabled<{/if}>> 上浮点数   value='<{$cars.p_spot}>'<{elseif $cars.p_pricetype==4 || !$cars.p_pricetype}>disabled<{/if}>> 点数
    • checked<{elseif $cars.p_pricetype==4}>disabled<{/if}>> 下浮点数   value='<{$cars.p_spot}>'<{elseif $cars.p_pricetype==4 || !$cars.p_pricetype}>disabled<{/if}>> 点数
    • checked<{elseif $cars.p_pricetype==4}>disabled<{/if}>> 优惠金额   value='<{$cars.reduceprice}>'<{elseif $cars.p_pricetype==4 || !$cars.p_pricetype}>disabled<{/if}>> 万元
    • checked<{elseif $cars.p_pricetype==4}>disabled<{/if}>> 加价金额   value='<{$cars.addprice}>'<{elseif $cars.p_pricetype==4 || !$cars.p_pricetype}>disabled<{/if}> size="10"> 万元
    • checked<{/if}>> 直接报价    万元
    • checked<{elseif $cars.p_pricetype==4}>disabled<{/if}>> 价格面议
  • 相关阅读:
    BZOJ2530 : [Poi2011]Party
    BZOJ3998 : [TJOI2015]弦论
    BZOJ3941 : [Usaco2015 Feb]Fencing the Herd
    BZOJ3939 : [Usaco2015 Feb]Cow Hopscotch
    搬家啦~
    BZOJ3837 : [Pa2013]Filary
    使用Privoxy做智能代理切换
    放弃iOS4,拥抱iOS5
    让Xcode的 stack trace信息可读
    改进iOS客户端的升级提醒功能
  • 原文地址:https://www.cnblogs.com/shangguancn/p/5731763.html
Copyright © 2020-2023  润新知