【发布时间】:2018-01-04 02:50:06
【问题描述】:
EventPrices += "<div class='after-price' id=divPrice>";
if (localStorage.getItem('SelectedRoleName') != null)
{
if (localStorage.getItem('SelectedRoleName').toString().trim() == "Admin") {
EventPrices += "<span class='price'><input type='radio' value='" + Item.PriceId + "' id='chkEventPrices' class='fa fa-check' name='chkEventPrices' title='" + Item.Price + "' onclick='CalculateTotal();'><label> $" + Item.Price + " </label> </span> ";
}
else {
EventPrices += "<span class='price'><input type='radio' value='" + Item.PriceId + "' id='chkEventPrices' disabled= 'disabled' class='fa fa-check' name='chkEventPrices' title='" + Item.Price + "' onclick='CalculateTotal();'><label> $" + Item.Price + " </label> </span> ";
}
} else {
EventPrices += "<span class='price'><input type='radio' value='" + Item.PriceId + "' id='chkEventPrices' disabled= 'disabled' class='fa fa-check' name='chkEventPrices' title='" + Item.Price + "' onclick='CalculateTotal();'><label> $" + Item.Price + " </label> </span> ";
}
EventPrices += "<span class='date'>After " + moment(Item.EarlyBirdDate).format("MMM DD, YYYY") + " </span>";
EventPrices += "</div></div>";
EventPrices += "<div><span id='spnEventPriceLiteralDetails_" + i + "'>" + EventPriceLiteraldetals + "</span></div>";
}
EventPrices += "</div><br/>";
i++;
});
这是我的代码。现在,如果我单击它正在使用的特定单选按钮..我希望如果我单击框,则只有单选按钮将被选中。
【问题讨论】:
-
你能发布完整的代码并改写你的话吗?现在很混乱。
-
您可以为此使用标签,请参阅stackoverflow.com/questions/1527721/…
标签: jquery