如何使用jQuery清除单选按钮的值 [英] How to clear the value of radio button using jquery
问题描述
大家好,
我对jquery非常陌生.我可以通过单击按钮使用.after()设置单选按钮的值.但是当我单击同一按钮时,我需要将另一个值传递给单选按钮,这里是串联单击按钮两次时发生.您能告诉我如何清除单选按钮值吗?我试过了
以下示例但不起作用
$(#radiobuttonid").val(");
var i =";
$(#radiobuttonid").after(");
$(#radiobuttonid").text(");
Hi to all,
I am very new to jquery.I am able to set the value for radio-buttons using .after() by clicking the button.But when i click the same button i need to pass another value to radio button,Here it is concatenation is taking place when i click button twice.Can you any one tell me how should i clear radio button value.I tried as
below examples but not working
$("#radiobuttonid").val("");
var i="";
$("#radiobuttonid").after(" ");
$("#radiobuttonid").text("");
推荐答案
(#radiobuttonid").val(");
var i =";
("#radiobuttonid").val("");
var i="";
(#radiobuttonid").after(");
("#radiobuttonid").after(" ");
(#radiobuttonid").text(");
("#radiobuttonid").text("");
这篇关于如何使用jQuery清除单选按钮的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!