使用Jquery清除Telerik MaskedTextBox的值 [英] Using Jquery to clear the values of Telerik MaskedTextBox

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

问题描述

我正在制作一个模块,其中人名和手机号码保存在数据库中。

Telerik Masked TextBox被用作获取输入电话号码的方法。



$(。mainContainer)。find(#salebyowner)。find(input)。val();

<当$ div在第一个实例加载时它分别清除了它上面的所有值。

但是当我点击相应的电话号码的文本框时,它是


,然后再次设置值。

我需要清除它。我已应用以下内容,但似乎无法正常工作。





$(。mainContainer)。find( #salebyowner)。find(#rad_sale_owner_no)。click(function(){$(。mainContainer)。find(#salebyowner)。find(#rad_sale_owner_no)。val();

警报(正在工作);

});



或者如果还有其他方法可以改变它的属性,那么答案也是受欢迎的。

I am making a module in which the person's name and mobile number is saved in the database.
The Telerik Masked TextBox is being used as a method to get input phone numbers.

$(".mainContainer").find("#salebyowner").find("input").val("");


when that div gets loaded at first instance it respectively clears all the values on it.
But when i click on that respective phone number's textbox, the values are then again set.
I need to clear it. I have applied the following but it doesn't seems to be working.


$(".mainContainer").find("#salebyowner").find("#rad_sale_owner_no").click(function () { $(".mainContainer").find("#salebyowner").find("#rad_sale_owner_no").val("");
alert("its working");
});

or if there is someother way by changing its properties, then that answer is also welcome.

推荐答案

(。mainContainer)。find(#salebyowner)。find(input)。val ();





当第一个实例加载div时它会分别清除它上面的所有值。

但是当我点击相应的电话号码的文本框时,会再次设置值。

我需要清除它。我已应用以下内容,但似乎无法正常工作。




(".mainContainer").find("#salebyowner").find("input").val("");


when that div gets loaded at first instance it respectively clears all the values on it.
But when i click on that respective phone number's textbox, the values are then again set.
I need to clear it. I have applied the following but it doesn't seems to be working.



(。mainContainer )。find(#salebyowner)。find(#rad_sale_owner_no)。click(function(){
(".mainContainer").find("#salebyowner").find("#rad_sale_owner_no").click(function () {


(。mainContainer)。find(#salebyowner) .find(#rad_sale_owner_no)。val();

alert(正在工作);

});



或者如果还有其他方法可以改变它的属性,那么也欢迎这个答案。
(".mainContainer").find("#salebyowner").find("#rad_sale_owner_no").val("");
alert("its working");
});

or if there is someother way by changing its properties, then that answer is also welcome.


这篇关于使用Jquery清除Telerik MaskedTextBox的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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