jquery删除单选按钮值中的html

jquery删除单选按钮值中的html,jquery,Jquery,我有一个单选按钮列表,它由USPS的XML提要动态生成,示例如下: <div id="pnlCartAllowsShippingMethodSelection"> <span id="ShipSelectionMsg"><p><b>Please select the desired shipping method below:</b></p></span> <input type="radi

我有一个单选按钮列表,它由USPS的XML提要动态生成,示例如下:

<div id="pnlCartAllowsShippingMethodSelection">
    <span id="ShipSelectionMsg"><p><b>Please select the desired shipping method below:</b></p></span>
    <input type="radio" name="ShippingMethodID" id="ShippingMethodID3" value="41|Express Mail International|55.60|0.00">&nbsp;Express Mail International $55.60 (USD)<span id="shippingdescription"> - Delivery in 3-5 Business Days*</span><br>
    <input type="radio" name="ShippingMethodID" id="ShippingMethodID3" value="9|Priority Mail International|42.58|0.00">&nbsp;Priority Mail International $42.58 (USD)<span id="shippingdescription"> - Delivery in 6-10 Business Days*</span><br>
    <input type="radio" name="ShippingMethodID" id="ShippingMethodID3" value="67|First-Class Package International Service<sup>TM</sup>**|19.53|0.00">&nbsp;First-Class Package International Service<sup>™</sup>** $19.53 (USD)<br>
    <input type="hidden" name="RequireShippingSelection" value="true">
</div>
您可以使用
.remove()

对于单选按钮,您可以执行以下操作:

$('#pnlCartAllowsShippingMethodSelection input').val(function(index, value) {
    return value.replace(/<sup>TM<\/sup>/g, '');
});
$('pnlcartAllowShippingMethodSelection input').val(函数(索引,值){
返回值。替换(/TM/g',);
});
您可以使用
.remove()

对于单选按钮,您可以执行以下操作:

$('#pnlCartAllowsShippingMethodSelection input').val(function(index, value) {
    return value.replace(/<sup>TM<\/sup>/g, '');
});
$('pnlcartAllowShippingMethodSelection input').val(函数(索引,值){
返回值。替换(/TM/g',);
});

对文本非常有效,我能做些什么来将其从单选按钮的值中删除?我在firebug的控制台窗口中运行它,但它似乎没有将其拉出。是的,非常有效,我的不同之处在于,一旦我更改了html TM字符与字符串“TM”,它实际上就将html TM字符与字符串“TM”放在了一起,效果非常好。非常感谢!对于文本来说效果很好,我能做些什么来从单选按钮的值中删除它?我在firebug的控制台窗口中运行它,但它似乎并没有将其拉出。是的,效果很好,我的区别是,它实际上是将html TM字符与字符串“TM”放在一起,一旦我改变它的效果就很好了。非常感谢!
$('#pnlCartAllowsShippingMethodSelection input').val(function(index, value) {
    return value.replace(/<sup>TM<\/sup>/g, '');
});
$('#pnlCartAllowsShippingMethodSelection sup").remove()