javascript - 这个地方,如何写一个js,当选中的那一项的运单状态为已发货时,点击派车,弹出警告?
迷茫
迷茫 2017-04-10 16:41:15
[JavaScript讨论组]

警告内容为“已发货,无法修改派车”

这是table

<table class="table"  layoutH="138" width="700" rel="yd">
    <thead>
        <tr>
            <th width="120">运单号</th>
            
        
            <th width="80">货品重量</th>
            
            <th width="150">运输目的地</th>
              <th width="100">运单状态</th>
              <th width="100">运送车辆</th>
            
        </tr>
    </thead>
    <tbody>
        <%
            for (zzpt_yd one : p.getList()) {
        %>
        <tr target="field_id" rel="<%=one.getId()%>">
            <td><%=one.getYd_number() == null ? "" : one.getYd_number()%></td>
    
            
           
            <td><%=one.getGoods_wight() == null ? "" : one.getGoods_wight()%></td>
        
            <td><%=one.getReceive_address() == null ? "" : one.getReceive_address()%></td>
            
            <% 
              if("0".equals(one.getYd_status())){
              %>
              <td>未派车</td>
             <% 
             }else if("1".equals(one.getYd_status())){
             %>
              <td>已发货</td>
              <% 
             }else if("2".equals(one.getYd_status())){
             %>
              <td>已完成</td>
             <% 
             }
              %>
              <td><%=one.getCar_number() == null ? "" : one.getCar_number()%></td>
        </tr>
        <%
            }
        %>
    </tbody></table>
迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

全部回复(1)
阿神
  • -!,能不要把后端代码揉在js里面吗,乱得不能忍 - -!。
    假如有个状态变量status,当其值为2时表示已经发货。你要点击的那个按钮class名为paiche

if(status == 2) {
    $('.paiche').click(function() {
        // 让警告框显示        
    })
}
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号