-1

jQueryを使用しています。

次のpタグで、アンカー テキストを独自のテキストに置き換える方法はありますか?

<p>
    <a href="#">Some Text1</a> some text goes here 
    <a href="#">Some Text2</a> some other text goes here 
</p>

望ましい出力:

<p>
    Some Text1 some text goes here 
    Some Text2 some other text goes here 
</p>
4

4 に答える 4

0

これを試してください:

$( document ).ready(function() {
    $("p").text("Some Text1 some text goes here Some Text2 some other text goes here");
 });
于 2013-11-11T12:20:37.827 に答える