选中行的索引: <tr onclick="alert(this.rowIndex)"

博客内容展示了一段HTML代码,其中`<tr>`标签使用`onclick`属性绑定了一个点击事件,点击表格行时会弹出该行的索引,体现了前端开发中事件交互的应用。

<tr onclick="alert(this.rowIndex)"

<table cellSpacing="0" cellPadding="5" width="700" align="center" border="0"> <tr> <td bgColor='<%=Application[Session["Style"].ToString()+"xtable_bgcolor"]%>' ><asp:datagrid id="grid" runat="server" Width="688px" HorizontalAlign="Center" AutoGenerateColumns="False" AllowPaging="True" PageSize="5" onselectedindexchanged="grid_SelectedIndexChanged" meta:resourcekey="gridResource1" > <ItemStyle HorizontalAlign="Left"></ItemStyle> <Columns> <asp:BoundColumn Visible="False" DataField="STAND_ID" HeaderText="STAND_ID" meta:resourcekey="BoundColumnResource1"></asp:BoundColumn> <asp:BoundColumn DataField="CUST_CODE" HeaderText="廠內代碼" meta:resourcekey="BoundColumnResource2"></asp:BoundColumn> <asp:BoundColumn DataField="CUST_NAME" HeaderText="公司名稱" meta:resourcekey="BoundColumnResource3"></asp:BoundColumn> <asp:BoundColumn DataField="VERSION_NAME" HeaderText="版稱" meta:resourcekey="BoundColumnResource4"></asp:BoundColumn> <asp:TemplateColumn HeaderText="修改" meta:resourcekey="BoundColumnResource5"> <HeaderStyle Width="30px"></HeaderStyle> <ItemTemplate> <asp:ImageButton id="BtnEdit" runat="server" ImageUrl="..\images\button_edit1.gif" CommandName="BtnEdit" meta:resourcekey="BtnEditResource1"></asp:ImageButton> </ItemTemplate> </asp:TemplateColumn> <asp:TemplateColumn HeaderText="刪除" meta:resourcekey="BoundColumnResource6"> <HeaderStyle Width="30px"></HeaderStyle> <ItemTemplate> <asp:ImageButton id="BtnDel" runat="server" CommandName="BtnDel" ImageUrl="..\images\button_del1.gif" meta:resourcekey="BtnDelResource1"></asp:ImageButton> </ItemTemplate> </asp:TemplateColumn> </Columns> <PagerStyle Visible="False"></PagerStyle> </asp:datagrid>为什么我点击某一行无法触发grid_SelectedIndexChanged事件
11-14
look54.php: <?php session_start(); require "../db54.php"; if(!isset($_SESSION["username"])) { header("Location: ../login54.php"); exit; } $user = $_SESSION["username"]; ?> <!DOCTYPE html> <html> <head> <title>我的购物车</title> <style> table { width: 100%; border-collapse: collapse; } th, td { padding: 8px; text-align: left; border-bottom: 1px solid #ddd; } img { max-width: 100px; } </style> <script> function openme(row) { row.style.backgroundColor = "#FFFFCC"; } function closeme(row) { row.style.backgroundColor = (row.rowIndex % 2 == 1 ? "#F0F0F0" : ""); } function op(button, id) { // Implement quantity increase/decrease logic } function select_all() { // Implement select all checkboxes } function reset_all() { // Implement reset all checkboxes } function delete_all() { // Implement delete selected items } function na() { return confirm("确定要移除该商品吗?"); } function op(t,id) { value=t.value; //按钮上显示的文字 if(value=='+') { //带参数跳转,兼容Google.ie parent.top.window.location="look54.php?op=add&id="+id; } if(value=='-') { parent.top.window.location="look54.php?op=sub&id="+id; } } </script> </head> <body> <h2>我的购物车</h2> <?php // 显示当前用户信息 - 统一使用username if(isset($_SESSION['username'])) { echo "<p>查看购物车 | 当前用户:" . htmlspecialchars($user) . "</p>"; ?> <form name="cartForm" method="post"> <table border=0 align=center width=100% cellspacing=0 bordercolordark=#9CC7EF cellpadding=4 style="line-height:35px"> <tr bgcolor="#FDF5E6"> <th>择</th> <th>商品名称</th> <th>商品图片</th> <th>订阅数量</th> <th>单价</th> <th>操作</th> </tr> <?php // 处理"拿掉该商品"超链接删除 if(isset($_GET['id']) && $_GET["op"]=="移除") { $id = $_GET['id']; $sql = "DELETE FROM dingdan54 WHERE id = $id"; if($db54->write($sql)) { echo "<script>alert('拿掉商品成功!')</script>"; } else { echo "<script>alert('拿掉商品失败!')</script>"; echo "<script>location.href('look54.php')</script>"; } } // 处理增减按钮+-操作 if(isset($_GET["op"])) { $op = $_GET["op"]; $id = $_GET['id']; // 获取当前数量 $sql = "SELECT * FROM dingdan54 WHERE id = $id"; $result = $db54->read($sql); if(count($result) > 0) { $current_num = $result[0]['num']; if($op == "add") { $new_num = $current_num + 1; } elseif($op == "sub" && $current_num > 1) { $new_num = $current_num - 1; } else { $new_num = $current_num; } // 更新数量 $update_sql = "UPDATE dingdan54 SET num = $new_num WHERE id = $id"; $db54->write($update_sql); } } // 处理"拿掉中商品"按钮 if(isset($_GET["str"])) { $ids = explode("|", trim($_GET["str"], "|")); foreach($ids as $id) { if(is_numeric($id)) { $sql = "DELETE FROM dingdan54 WHERE id = $id"; $db54->write($sql); } } echo "<script>alert('拿掉商品成功!')</script>"; echo "<script>location.href('look54.php')</script>"; } // 显示购物车 $cart_sql = "SELECT dingdan54.id AS id, sp54.name AS name, sp54.photo AS photo, SUM(dingdan54.num) AS total_num, sp54.money AS money FROM sp54 JOIN dingdan54 ON sp54.id = dingdan54.sp_id WHERE sp54.id = dingdan54.sp_id AND dingdan54.user = '$user' AND dingdan54.flag = 0 GROUP BY sp54.id, sp54.name, sp54.photo, sp54.money"; $cart_result = $db54->read($cart_sql); $n = count($cart_result); if ($n == 0) { echo "<tr><td colspan='6'>购物车是空的!</td></tr>"; }else{ for ($i = 0; $i < $n; $i++) { $item = $cart_result[$i]; echo "<tr " . ($i % 2 == 1 ? "bgcolor='#F0F0F0'" : "") . " onmouseover='openme(this)' onmouseout='closeme(this)'>"; echo "<td><input type='checkbox' name='flag' value='{$item['id']}'></td>"; echo "<td>{$item['name']}</td>"; echo "<td><img src='images/{$item['photo']}' width='30' height='30'></td>"; echo "<td><input type='button' name='enter' value='-' onclick='op(this, {$item['id']})'> <input type='text' name='num{$item['id']}' readonly size='3' style='text-align:center' value='{$item['total_num']}'> <input type='button' name='enter' value='+' onclick='op(this, {$item['id']})'></td>"; echo "<td>{$item['money']}元</td>"; echo "<td><a href='look54.php?op=移除&id={$item['id']}' onclick='return na()'> 移除该商品</a></td>"; echo "</tr>"; } } ?> <tr align="center"> <td colspan="5" style="padding-top:8px;"> <input type="button" name="enter" value="全" onclick="select_all()"> <input type="button" name="enter" value="全部取消" onclick="reset_all()"> <input type="button" name="enter" value="删除中商品" onclick="delete_all()"> </td> </tr> </table> <?php $total_sql = "SELECT sp54.money AS money, dingdan54.num AS num FROM sp54, dingdan54 WHERE sp54.id = dingdan54.sp_id AND dingdan54.user = '$user' AND dingdan54.flag = 0"; $total_result = $db54->read($total_sql); $sum = 0; foreach ($total_result as $item) { $sum += $item["money"] * $item["num"]; } echo "应付金额:<b><font color=#FF0000>¥"; echo $sum . " 元"; echo " <a href='trolley54.php'>| 去付款</a>"; ?> </form> <a href="index54.php">继续购物</a> <?php } ?> </body> </html> l54.php: <?php include('../db54.php'); session_start(); $user_id=$_SESSION["id"]?? 0; $sql="select * from user54 where id='$user_id'"; $result=$db54->read($sql); $username=$result[0]["username"]; ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>信安28班54何雨霏PHP实训</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="robots" content="all,follow"> <link rel="stylesheet" href="../css/bootstrap.css"> <!-- Bootstrap CSS--> <link rel="stylesheet" href="https://www.jq22.com/jquery/bootstrap-4.2.1.css"> <!-- Font Awesome CSS--> <link rel="stylesheet" href="https://www.jq22.com/jquery/font-awesome.4.7.0.css"> <!-- Fontastic Custom icon font--> <link rel="stylesheet" href="css/fontastic.css"> <!-- Google fonts - Roboto --> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700"> <!-- jQuery Circle--> <link rel="stylesheet" href="css/grasp_mobile_progress_circle-1.0.0.min.css"> <!-- Custom Scrollbar--> <link rel="stylesheet" href="vendor/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css"> <!-- theme stylesheet--> <link rel="stylesheet" href="css/style.default.css" id="theme-stylesheet"> <!-- Custom stylesheet - for your changes--> <link rel="stylesheet" href="css/custom.css"> <!-- Favicon--> <link rel="shortcut icon" href="img/favicon.ico"> <!-- Tweaks for older IEs--><!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]--> </head> <body> <!-- Side Navbar --> <nav class="side-navbar"> <div class="side-navbar-wrapper"> <!-- Sidebar Header --> <div class="sidenav-header d-flex align-items-center justify-content-center"> <!-- User Info--> <div class="sidenav-header-inner text-center"><img src="img/avatar-7.jpg" alt="person" class="img-fluid rounded-circle"> <h2 class="h5">Nathan Andrews</h2><span>Web Developer</span> </div> <!-- Small Brand information, appears on minimized sidebar--> <div class="sidenav-header-logo"><a href="index.html" class="brand-small text-center"> <strong>B</strong><strong class="text-primary">D</strong></a></div> </div> <!-- Sidebar Navigation Menus--> <div class="main-menu"> <h5 class="sidenav-heading">Main</h5> <ul id="side-main-menu" class="side-menu list-unstyled"> <li><a href="../index.php"> <i class="icon-home"></i>何雨霏的留言板 </a></li> <li><a href="forms.html"> <i class="icon-form"></i>实训页面1 </a></li> <li><a href="charts.html"> <i class="fa fa-bar-chart"></i>实训页面2 </a></li> <li><a href="tables.html"> <i class="icon-grid"></i>实训页面3 </a></li> <li><a href="#exampledropdownDropdown" aria-expanded="false" data-toggle="collapse"> <i class="icon-interface-windows"></i>Example dropdown </a> <ul id="exampledropdownDropdown" class="collapse list-unstyled "> <li><a href="#">admin</a></li> <li><a href="#">查看购物车</a></li> <li><a href="#">后台管理</a></li> </ul> </li> <li><a href="login.html"> <i class="icon-interface-windows"></i>Login page </a></li> <li> <a href="#"> <i class="icon-mail"></i>Demo <div class="badge badge-warning">6 New</div></a></li> </ul> </div> <div class="admin-menu"> <h5 class="sidenav-heading">Second menu</h5> <ul id="side-admin-menu" class="side-menu list-unstyled"> <li> <a href="#"> <i class="icon-screen"> </i>admin</a></li> <li> <a href=""> <i class="icon-screen"> </i>查看购物车</a></li> <li> <a href=""> <i class="icon-screen"> </i>后台管理</a></li> </ul> </div> </div> </nav> <div class="page"> <!-- navbar--> <header class="header"> <nav class="navbar"> <div class="container-fluid"> <div class="navbar-holder d-flex align-items-center justify-content-between"> <div class="navbar-header"><a id="toggle-btn" href="#" class="menu-btn"><i class="icon-bars"> </i></a><a href="index.html" class="navbar-brand"> <div class="brand-text d-none d-md-inline-block"><span> <?php ?> </span><strong class="text-primary">信安28班54何雨霏PHP实训 <?php echo $username; ?></strong></div></a></div> <ul class="nav-menu list-unstyled d-flex flex-md-row align-items-md-center"> <!-- Notifications dropdown--> <li class="nav-item dropdown"> <a id="notifications" rel="nofollow" data-target="#" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link"><i class="fa fa-bell"></i><span class="badge badge-warning">12</span></a> <ul aria-labelledby="notifications" class="dropdown-menu"> <li><a rel="nofollow" href="#" class="dropdown-item"> <div class="notification d-flex justify-content-between"> <div class="notification-content"><i class="fa fa-envelope"></i>You have 6 new messages </div> <div class="notification-time"><small>4 minutes ago</small></div> </div></a></li> <li><a rel="nofollow" href="#" class="dropdown-item"> <div class="notification d-flex justify-content-between"> <div class="notification-content"><i class="fa fa-twitter"></i>You have 2 followers</div> <div class="notification-time"><small>4 minutes ago</small></div> </div></a></li> <li><a rel="nofollow" href="#" class="dropdown-item"> <div class="notification d-flex justify-content-between"> <div class="notification-content"><i class="fa fa-upload"></i>Server Rebooted</div> <div class="notification-time"><small>4 minutes ago</small></div> </div></a></li> <li><a rel="nofollow" href="#" class="dropdown-item"> <div class="notification d-flex justify-content-between"> <div class="notification-content"><i class="fa fa-twitter"></i>You have 2 followers</div> <div class="notification-time"><small>10 minutes ago</small></div> </div></a></li> <li><a rel="nofollow" href="#" class="dropdown-item all-notifications text-center"> <strong> <i class="fa fa-bell"></i>view all notifications </strong></a></li> </ul> </li> <!-- Messages dropdown--> <li class="nav-item dropdown"> <a id="messages" rel="nofollow" data-target="#" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link"><i class="fa fa-envelope"></i><span class="badge badge-info">10</span></a> <ul aria-labelledby="notifications" class="dropdown-menu"> <li><a rel="nofollow" href="#" class="dropdown-item d-flex"> <div class="msg-profile"> <img src="img/avatar-1.jpg" alt="..." class="img-fluid rounded-circle"></div> <div class="msg-body"> <h3 class="h5">Jason Doe</h3><span>sent you a direct message</span><small>3 days ago at 7:58 pm - 10.06.2019</small> </div></a></li> <li><a rel="nofollow" href="#" class="dropdown-item d-flex"> <div class="msg-profile"> <img src="img/avatar-2.jpg" alt="..." class="img-fluid rounded-circle"></div> <div class="msg-body"> <h3 class="h5">Frank Williams</h3><span>sent you a direct message</span><small>3 days ago at 7:58 pm - 10.06.2019</small> </div></a></li> <li><a rel="nofollow" href="#" class="dropdown-item d-flex"> <div class="msg-profile"> <img src="img/avatar-3.jpg" alt="..." class="img-fluid rounded-circle"></div> <div class="msg-body"> <h3 class="h5">Ashley Wood</h3><span>sent you a direct message</span><small>3 days ago at 7:58 pm - 10.06.2019</small> </div></a></li> <li><a rel="nofollow" href="#" class="dropdown-item all-notifications text-center"> <strong> <i class="fa fa-envelope"></i>Read all messages </strong></a></li> </ul> </li> <!-- Languages dropdown --> <li class="nav-item dropdown"><a id="languages" rel="nofollow" data-target="#" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link language dropdown-toggle"><img src="img/flags/16/GB.png" alt="English"><span class="d-none d-sm-inline-block">English</span></a> <ul aria-labelledby="languages" class="dropdown-menu"> <li><a rel="nofollow" href="#" class="dropdown-item"> <img src="img/flags/16/DE.png" alt="English" class="mr-2"><span>German</span></a></li> <li><a rel="nofollow" href="#" class="dropdown-item"> <img src="img/flags/16/FR.png" alt="English" class="mr-2"><span>French </span></a></li> </ul> </li> <!-- Log out--> <li class="nav-item"><a href="login.html" class="nav-link logout"> <span class="d-none d-sm-inline-block">Logout</span><i class="fa fa-sign-out"></i></a></li> </ul> </div> </div> </nav> </header> <section> <?php require "daohang54.php"; ?> <div class="main"> <?php require "look54.php"; ?> </div> </section> <footer class="main-footer"> <div class="container-fluid"> <div class="row"> <div class="col-sm-6"> <p>Copyright © 信安28班54何雨霏《Web应用与安全管理实训》 All rights reserved.</p> </div> <!--<div class="col-sm-6 text-right"></div>--> </div> </div> </div> </footer> </div> <!-- JavaScript files--> <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> <script src="vendor/popper.js/umd/popper.min.js"> </script> <script src="https://www.jq22.com/jquery/bootstrap-4.2.1.js"></script> <script src="js/grasp_mobile_progress_circle-1.0.0.min.js"></script> <script src="vendor/jquery.cookie/jquery.cookie.js"> </script> <script src="vendor/chart.js/Chart.min.js"></script> <script src="vendor/jquery-validation/jquery.validate.min.js"></script> <script src="vendor/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js"></script> <script src="js/charts-home.js"></script> <!-- Main File--> <script src="js/front.js"></script> </body> </html> 页面能显示look54的内容,不能显示l54的框架
06-27
function initAfterSales(){ var afterSales_Json = [#if afterSales_Json!=null]${afterSales_Json}[#else][][/#if]; console.log("afterSales_Json:" + JSON.stringify(afterSales_Json)); var afterSalesCols = [[ { title: '${message("售后类型")}', field: 'after_sale_type', width: 150, align: 'center', formatter: function (val, item, rowIndex) { var html = '<select name="contractAfterSaleTerms[' + rowIndex + '].afterSaleType" class="text afterSaleType" onchange="editRate(this)">' + '<option value="" >请择</option>' + '<option value="0" ' + (val == "0" ? "selected" : "") + '>质保</option>' + '<option value="1" ' + (val == "1" ? "selected" : "") + '>开机调试</option>' + '<option value="2" ' + (val == "2" ? "selected" : "") + '>巡检</option>' + '<option value="3" ' + (val == "3" ? "selected" : "") + '>保养</option>' + '</select>'; return html; } }, { title: '${message("基准类型")}', field: 'after_sale_calculate_type', width: 150, align: 'center', formatter: function (val, item, rowIndex) { var html = ' <select name="contractAfterSaleTerms[' + rowIndex + '].afterSaleCalculateType" class="text afterSaleCalculateType" onChange="editRate(this)"> ' ; html +='<option value="">请择</option>' + '<option value="0" '+ (val == "0" ? "selected" : "") + '>实际出库日期</option>' + '<option value="1"' + (val == "1" ? "selected" : "") + '>初验日期</option>' + '<option value="2"' + (val == "2" ? "selected" : "") + '>终验日期</option>' + "</select>"; return html; } }, { title: '${message("频率")}', field: 'after_sale_interval', align: 'center', width: 150, formatter: function (val, item, rowIndex) { var flag1; var flag2; var flag3; var flag4; if (val == '0'){ flag1 = 'selected'; }else if (val == '1'){ flag2 = 'selected'; }else if (val == '2'){ flag3 = 'selected'; }else if (val == '3'){ flag4 = 'selected'; } var html = '<select name="contractAfterSaleTerms[' + rowIndex + '].afterSaleInterval" class="text afterSaleInterval " onchange="editRate(this)">' + '<option value="">请择</option>' + '<option value="0" '+flag1+'>月</option>' + '<option value="1" '+flag2+'>季度</option>' + '<option value="2" '+flag3+'>半年度</option>' + '<option value="3" '+flag4+'>年度</option>' + "</select>"; return html; } }, { title: '${message("次数")}', field: 'times', width: 150, align: 'center', formatter: function (val, item, rowIndex) { var html = '<input name="contractAfterSaleTerms[' + rowIndex + '].times" class="text times" min="0" step="1" value = "' + val + '" type="number">'; return html; } }, { title: '备注', align: 'center', field: 'remark', width: 240, formatter: function (val, item, rowIndex) { return '<input name="contractAfterSaleTerms[' + rowIndex + '].remark" class="text remark" value="'+val+'" type="text">'; } }, { title: '${message("操作")}', field: 'xxx', align: 'center', width: 60, formatter: function (val, item,rowIndex) { rowIndex++; return '<a href="javascript:;" class="deleteAfterSalesTerms btn-delete">删除</a>'; } } ]]; var options = { tableName: "tableAfterSalesList",//表名 data: afterSales_Json, columns: afterSalesCols,//列 pagination: false,//是否使用分页 onLoadSuccess: function () { bindDeleteEvent(); } }; //初始化列表 initEasyUiTable('#table-afterSales', options); $("#addAfterSales").click(function () { var rows = $('#table-afterSales').datagrid('getRows'); if (rows.length == 5) { $.message_alert("最多只能添加5行!"); return false; } $('#table-afterSales').datagrid('appendRow', {}); bindDeleteEvent(); }); function bindDeleteEvent() { $('.deleteAfterSalesTerms').off('click').on('click', function () { var index = $(this).closest('tr.datagrid-row').attr('datagrid-row-index'); $('#table-afterSales').datagrid('deleteRow', parseInt(index)); }); } } 请使用纯html和内联 实现当售后类型为质保时移除基准类型的disabled
10-31
function updateAdminQuotaModify(thisButton) { let siteId = $('#addModalSiteId').attr("data-siteGroup-type"); let groupNo = $('#addModalGroupName').attr("data-group-type"); let quotaReleaseId = $('#editModalQuotaModifyQuotaReleaseId').val(); let quotaGroupAdminId = $('#editModalQuotaModifyQuotaGroupAdminId').val(); let availableQuotaCountAfter = $('#editModalQuotaModifyAvailableQuotaCount').val(); let totalQuotaCount = $('#editModalQuotaModifyTotalQuotaCount').val(); let availableQuotaCountDifference = availableQuotaCountAfter - availableQuotaCountBefore; alert(availableQuotaCountBefore) totalQuotaCount = totalQuotaCount + availableQuotaCountDifference if (isInteger(availableQuotaCountAfter)== false || parseInt(availableQuotaCountAfter) < 0){ return alert("Available Count必须为≥0的整数!") } let formData = new FormData(); formData.append("quotaReleaseId", quotaReleaseId); formData.append("quotaGroupAdminId", quotaGroupAdminId); formData.append("totalQuotaCount", totalQuotaCount); $.ajax({ type: "post", url: "/admin/quota-modify/action", data: formData, cache: false, processData: false, contentType: false, }).done(function (msg) { if (msg=="提交成功!"){ $("#editModalQuotaModify").modal("hide"); $("#criteriaQuotaModifyCategory").val(null).trigger('change'); $("#criteriaQuotaModifyQuotaType").val(null).trigger('change'); sortCondition = {}; localStorage.removeItem('sortCondition'); selectQuotaModifyReload(1,groupNo,siteId,{}); alert(msg); } else { alert(msg); } }).fail(function () { alert("发生错误!"); }); 我在使用这个function,它对应的是一个modal,model中字段的值是从这里来的function editModalQuotaModify(thisButton) { let row = $(thisButton).closest("tr"); let rowIndex = row.index(); let quotaReleaseId = row.children("td:eq(0)").text(); let quotaGroupAdminId = row.children("td:eq(1)").text(); let releaseDateFrom = row.children("td:eq(2)").text(); let siteId = row.children("td:eq(3)").text(); let groupName = row.children("td:eq(4)").text(); let categoryValue = row.children("td:eq(5)").attr("data-category-type"); let categoryText = row.children("td:eq(5)").text(); let quotaTypeValue = row.children("td:eq(6)").attr('data-quota-type'); let quotaTypeText = row.children("td:eq(6)").text(); let totalQuotaCount = row.children("td:eq(7)").text(); let availableQuotaCount = row.children("td:eq(8)").text(); $("#editModalQuotaModifyQuotaReleaseId").val(quotaReleaseId); $("#editModalQuotaModifyQuotaGroupAdminId").val(quotaGroupAdminId); $("#editModalQuotaModifyReleaseDateFrom").val(releaseDateFrom); $("#editModalQuotaModifySiteId").val(siteId); $("#editModalQuotaModifyGroupName").val(groupName); $("#editModalQuotaModifyCategory").val(categoryText); $("#editModalQuotaModifyType").val(quotaTypeText); $("#editModalQuotaModifyTotalQuotaCount").val(totalQuotaCount); $("#editModalQuotaModifyAvailableQuotaCount").val(availableQuotaCount); modalSelect2Init(); employeeNoSelect2Init( $("#editModalQuotaOwner")); $("#editModalQuotaModify").modal("show"); } 我现在的问题是对于availableQuotaCount本身是从table获取到某个值比如8,然后在modal中用户可以对这个8进行修改,比如从8改成6,现在可以在uodateAdminQuotaModify中获取到6.我还需要之前的8,这个怎么在updateAdminQuotaModify中获取到?因为我需要计算它们的差值
11-28
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值