簡體   English   中英

如何在 C# MVC 中使用 Jquery 獲取網格中字符的長度

[英]How to Get the length of the Characters in grid using Jquery in C# MVC

我想從下面的 Jquery 腳本中獲取 Grid 中的字符數

即使我嘗試通過長度(數據)它表明長度是一個屬性而不是刪除函數后的函數字符數顯示為 0

{
         "sDefaultContent": "", "data": "fld_output_value", "width": 90, "title": "Output Length", render: function (data, string, full, meta) {
                            return length;
                        }
                    },

更新我的代碼后

{
         "sDefaultContent": "", "data": "fld_output_value", "width": 90, "title": "Output Length", render: function (data, string, full, meta) {
                            return data.length;
                        }
                    },

正如@R4ncid 所說

data.length

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM