<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    技術改變世界

    極力關注購物車,訂單支付,促銷計算,運費模板!

      BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
      6 Posts :: 7 Stories :: 1 Comments :: 0 Trackbacks
    一個運費模板的需求,類似淘寶的運費模板的設置,其中存在div定位在文本框下
    <script src="${ctx}/scripts/BillionFun/common.js"></script>
    <style>
        input
    {
            width
    :50px;
        
    }
        #t_location li
    {
            list-style
    : none;
            float
    :left;
            width
    :24%;
        
    }
        #t_location
    {
            width
    :400px;
            border
    :1px green solid;
            background-color
    :gray;
            position
    : absolute;
            display
    : none;
        
    }
    </style>
    <c:choose>
            
    <c:when test="${shipfeetem.chargeMode==1}">
                
    <c:set var="chargeMode" value="個"></c:set>
            
    </c:when>
            
    <c:when test="${shipfeetem.chargeMode==2}">
                
    <c:set var="chargeMode" value="元"></c:set>
            
    </c:when>
    </c:choose>
    <table>
        
    <tr>
            
    <td>模板名稱:</td>
            
    <td colspan="3">${shipfeetem.fullName }</td>
        
    </tr>
        
    <tr>
            
    <td>計費方式:</td>
            
    <td>
                
    <c:choose>
                
    <c:when test="${shipfeetem.chargeMode==1 }">數量</c:when>
                
    <c:when test="${shipfeetem.chargeMode==2 }">金額</c:when>
                
    </c:choose>
             
    </td>
            
    <td>模板類型:</td>
            
    <td>
                
    <c:choose>
                
    <c:when test="${shipfeetem.dispatch==1 }">按區域計費</c:when>
                
    <c:when test="${shipfeetem.dispatch==2 }">全國統一計費</c:when>
                
    </c:choose>
            
    </td>
        
    </tr>
    </table>

    <table>
      
    <tr>
        
    <td>免郵條件:</td>
        
    <td> 買 <input type="text" id="t_freeCondition" name="" value="" /> ${chargeMode}(含)以上免郵,</td>
      
    </tr>
      
    <tr>
        
    <td>至 <input type="text" name="t_provinces" value=""  />的運費:</td>
        
    <td>
            買 
    <input type="text" id="t_baseCondition" name="" value=""  /> ${chargeMode}(含)以內,
            收郵費
    <input type="text" name="" id="t_basePrice" value=""  /> 元,
            每多買 
    <input type="text" id="t_addCondition" name="" value=""/> ${chargeMode}(含)以內,
            加收郵費 
    <input type="text" id="t_addPrice" name="" value=""/> 元.
       
    </td>
      
    </tr>
      
    <tr>
        
    <td>至 <input type="text" name="t_provinces" value=""  />的運費:</td>
        
    <td>
            買 
    <input type="text" id="t_baseCondition" name="" value=""  /> ${chargeMode}(含)以內,
            收郵費
    <input type="text" name="" id="t_basePrice" value=""  /> 元,
            每多買 
    <input type="text" id="t_addCondition" name="" value=""/> ${chargeMode}(含)以內,
            加收郵費 
    <input type="text" id="t_addPrice" name="" value=""/> 元.
       
    </td>
      
    </tr>
      
    <tr>
        
    <td>至 <input type="text" name="t_provinces" value=""  />的運費:</td>
        
    <td>
            買 
    <input type="text" id="t_baseCondition" name="" value=""  /> ${chargeMode}(含)以內,
            收郵費
    <input type="text" name="" id="t_basePrice" value=""  /> 元,
            每多買 
    <input type="text" id="t_addCondition" name="" value=""/> ${chargeMode}(含)以內,
            加收郵費 
    <input type="text" id="t_addPrice" name="" value=""/> 元.
       
    </td>
      
    </tr>
    </table>

    <div id="t_location">
        
    <c:forEach var="province" items="${list}">
            
    <c:if test="${province.parentId==0}">
                
    <li><input type="checkbox"  value="${province}">${province.fullName }</li>
            
    </c:if>
        
    </c:forEach>
        
    <br/>
        
    <c:forEach var="province" items="${list}">
            
    <c:if test="${province.parentId!=0}">
                
    <li><input type="checkbox"  value="${province}">${province.fullName }</li>
            
    </c:if>
        
    </c:forEach>
        
    <div style="clear: both;"><href="javascript:$('#t_location').hide();">關閉</a></div>
    </div>
    <script type="text/javascript">
    $().ready(
    function(){
        $(
    "input[name='t_provinces']").click(function(){
        
    //    alert(this.clientWidth);
            var pos=new getPos(this);
            $(
    "#t_location").attr("style",";top:"+(pos.Top+this.clientHeight+5)+"px;left:"+pos.Left+"px");
            $(
    "#t_location").show();
        });
    });
    </script>
    common.js里面的用到的方法主要是:
    function getPos(obj){
        
    this.Left=0;
        
    this.Top=0;
        
    this.Height=obj.offsetHeight;
        
    this.Width=obj.offsetWidth;
        
    var tempObj=obj;
        
    while (tempObj.tagName.toLowerCase()!="body" && tempObj.tagName.toLowerCase()!="html"){
            
    this.Left+=tempObj.offsetLeft;
            
    this.Top+=tempObj.offsetTop;
            tempObj
    =tempObj.offsetParent;
        }
    }
    getPos(obj)這個方法得到元素在網頁中的絕對位置
    this.clientHeight得到元素的自身的高,如果需要用到寬,則是this.clientWidth 詳細請見 



    知人不必言盡,留三分余地于人,留些口德于己;
    責人不必苛盡,留三分余地于人,留些肚量于己;
    才能不必傲盡,留三分余地于人,留些內涵于己;
    鋒芒不必露盡,留三分余地于人,留些收斂于己;
    有功不必邀盡,留三分余地于人,留些謙讓于己
    得理不必搶盡,留三分余地于人,留些寬容于己;
    得寵不必恃盡,留三分余地于人,留些后路于己;
    氣勢不必倚盡,留三分余地于人,留些厚道于己;
    富貴不必享盡,留三分余地于人,留些福擇于己;
    凡事不必做盡,留三分余地于人,留些余德于己。

    N:

    朱漪


    Q:412546724
    E:yi.zhu89@yahoo.com.cn
    M:13611084323
    posted on 2011-08-01 18:43 朱漪 閱讀(1521) 評論(0)  編輯  收藏 所屬分類: 頁面技巧
    主站蜘蛛池模板: 亚洲女久久久噜噜噜熟女| 亚洲电影一区二区三区| 中文毛片无遮挡高清免费| 久久久久久久亚洲Av无码| 青春禁区视频在线观看直播免费| 亚洲国产AV无码一区二区三区| 浮力影院亚洲国产第一页| 57pao一国产成永久免费| 在线观看亚洲网站| 亚洲日韩区在线电影| 国产精品成人四虎免费视频| 久草福利资源网站免费| 国产成人亚洲精品蜜芽影院| 亚洲Av熟妇高潮30p| 免费人成无码大片在线观看| 在线免费中文字幕| 一级特黄aaa大片免费看| 亚洲一卡2卡4卡5卡6卡残暴在线| 亚洲AV无码一区二三区| 在线视频精品免费| 中国一级特黄的片子免费| 亚洲日韩国产一区二区三区在线| 亚洲国产精品嫩草影院在线观看| 日本免费电影一区| 99无码人妻一区二区三区免费| 一区二区三区免费在线视频| 亚洲一区二区无码偷拍| 亚洲AV无码专区国产乱码4SE| 亚洲成年看片在线观看| 成人毛片免费在线观看| 精品无码无人网站免费视频| jizz在线免费播放| 毛片亚洲AV无码精品国产午夜| 91亚洲自偷在线观看国产馆| 日韩亚洲人成在线综合日本| 亚洲精品无码久久不卡| 国产高清免费在线| 女人张腿给男人桶视频免费版| 69视频免费在线观看| 国产一级片免费看| 两个人看的www高清免费观看|