使用jQuery隐藏按钮 [英] Hiding button using jquery

查看:165
本文介绍了使用jQuery隐藏按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

能否请你告诉我,我怎么能隐藏$ P $之后这个按钮pssing它,使用jQuery?

 <输入类型=按钮NAME =ComandaVALUE =ComandaID =Comanda数据点击=未点击/>

或这个

 <输入类型=提交NAME =VizualizeazaVALUE =Vizualizeaza>


解决方案

试试这个:

  $('输入[名称= Comanda]')
。点击(
     功能()
     {
         $(本).hide();
     }
);

有关做一切你可以使用像这样的:

  $('输入[名称= Comanda]')
。点击(
     功能()
     {
         $(本).hide();         $(ClassNameOfShouldBeHiddenElements)隐藏()。
     }
);

有关hidding根据其ID的任何其他元素,用这一个:

  $('输入[名称= Comanda]')
。点击(
     功能()
     {
         $(本).hide();         $(#FirstElement),隐藏()。
         $(#SecondElement),隐藏()。
         $(#ThirdElement),隐藏()。
     }
);

Can you please tell me how can I hide this button after pressing it, using jquery ?

<input type="button" name="Comanda" value="Comanda" id="Comanda" data-clicked="unclicked" />

or this one

<input type=submit  name="Vizualizeaza" value="Vizualizeaza">

解决方案

Try this:

$('input[name=Comanda]')
.click(
     function ()
     {
         $(this).hide();
     }
);

For doing everything else you can use something like this one:

$('input[name=Comanda]')
.click(
     function ()
     {
         $(this).hide();

         $(".ClassNameOfShouldBeHiddenElements").hide();
     }
);

For hidding any other elements based on their IDs, use this one:

$('input[name=Comanda]')
.click(
     function ()
     {
         $(this).hide();

         $("#FirstElement").hide();
         $("#SecondElement").hide();
         $("#ThirdElement").hide();
     }
);

这篇关于使用jQuery隐藏按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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