如何更改“sButtonText”的文本对于数据表 [英] How to change text of "sButtonText" for the data table

查看:90
本文介绍了如何更改“sButtonText”的文本对于数据表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要隐藏数据表的列,并通过单击按钮取消隐藏它。

按钮名称为隐藏列。

所需要的是一旦我点击隐藏列,数据表按钮的文本应改为显示列,反之亦然。



是吗可能。



请指导。

解决方案

您可以使用Flag。假设初始状态为0,即隐藏列。当您单击按钮设置标志状态为1并将文本显示为显示列时。


 


#button)。click( function () {

Hi All,
I have a requirement for Hiding column of the data table and unhide it with a button click.
The button name is Hide Column.
What is required is once I click on Hide Column the text of the data table button should change to Show Column and vice versa.

Is it possible.

Please guide.

解决方案

You can use a Flag. Let say the initial status is 0 i.e Hide Columns. When you click the button set flag status to 1 and text to Show Columns.



("#button").click(function(){


这篇关于如何更改“sButtonText”的文本对于数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆