zoukankan      html  css  js  c++  java
  • 车辆管理系统(十)

    这个登录界面最可爱。看看这个猫头鹰!

       

    写密码!

      

    我觉得这个项目首页做的最炫。

    昨天发现一个问题 就是在我查看了详情之后,不是有图片显示在上面吗! 然后我去添加数据的时候,那张图片还在上面。

    出错的地方是:

     1 {
     2                                     text : "查看详细信息",
     3                                     iconCls : "icon-print",
     4                                     handler : function() {
     5                                         var rows = $('#test').datagrid('getSelections');
     6                                         if (rows.length == 1){
     7                                             $.ajax({
     8                                                 url : 'cy/masterAction_getMasterById.action',
     9                                                 data : 'master.id=' + rows[0].id,
    10                                                 cache : false,
    11                                                 success : function(data) {
    12                                                     var obj=data;
    13                                                    //打开详情窗口
    14                                                     $('#lookInfo').dialog('open');
    15                                                     //设值
    16                                                     $('#lookInfo_form').form('load', {
    17                                                         'master.id':obj.id,
    18                                                         'master.name' : obj.name,
    19                                                         'master.gender' :obj.gender==0 ? "女":"男",
    20                                                           'master.birthday' :obj.birthday,
    21                                                         'master.phone' : obj.phone,
    22                                                         'master.address' : obj.address,
    23                                                         'master.enterTime' : obj.enterTime,
    24                                                         'master.remark' : obj.remark,
    25                                                         'master.picture': $('img').attr('src','http://localhost:8080/carSystem/PAGE/images/'+obj.picture)//这里给img添加了src,结果是给全部的img都添加了相同的图片路      //径.这里给显示图片给个class=“picture” 改成 'master.picture':$('.picture').attr('src','http://localhost:8080/carSystem/PAGE/images/'+obj.picture) 这样就可以了  给需要显示图片的都这样设置一下  就可以了!
    26                                                 });
    27                                                 }
    28                                             });
    29                                         }else{
    30                                              $.messager.alert("提示", "请选择一条数据来操作!", "info"); 
    31                                         }
    32                                     }
    33 
    34                                 } 
  • 相关阅读:
    Selenium RC For Python:教程2
    sql server 获取同比或环比
    C#泛型泛型集合Dictionary<K,V>
    C# FileStream
    c# 强命名的作用
    装箱与拆箱的概念及意义
    SQL Server中Rollup关键字使用技巧
    Javascript内存泄露
    几条复杂的SQL语句
    Group by与having理解
  • 原文地址:https://www.cnblogs.com/hellokitty1/p/5142720.html
Copyright © 2011-2022 走看看