Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery替换<;span>;带图像的文本_Jquery - Fatal编程技术网

Jquery替换<;span>;带图像的文本

Jquery替换<;span>;带图像的文本,jquery,Jquery,我目前拥有在线商店购物车的以下代码: <span class="ShoppingList_RemoveCheckBox"> <a onclick="document.My_Account_Shopping_List_Detail_Content.rcuid.value="475"; document.My_Account_Shopping_List_Detail_Content.FormSubmittedByLink.value="submittedByRemoveLink";

我目前拥有在线商店购物车的以下代码:

<span class="ShoppingList_RemoveCheckBox">
<a onclick="document.My_Account_Shopping_List_Detail_Content.rcuid.value="475";
document.My_Account_Shopping_List_Detail_Content.FormSubmittedByLink.value="submittedByRemoveLink"; document.My_Account_Shopping_List_Detail_Content.submit(); return false;" href="noURL">Remove </a>
</span>
选择代码,但我不确定是否有办法只更改文本。我知道有.text()Jquery,但是你不需要有一个特定的id来引用它吗?

$(“span.ShoppingList\u RemoveCheckBox a:contains(Remove)”).html($(“
$('.ShoppingList\u RemoveCheckBox a').html(“”)
$("span.ShoppingList_RemoveCheckBox a:contains(Remove)").html($("<img/>", { src: imageURL }));
$("span.ShoppingList_RemoveCheckBox a:contains(Remove)").html($("<img/>", { src: imageURL }));
$('.ShoppingList_RemoveCheckBox a').html('<img src="remove.gif" />')