HTML是
<a>ref</a>
我需要得到
<a>ref</a>text
我怎样才能做到这一点?$('a').append('text')只插入文本<a></a>,而不是插入文本
Jef*_*nal 58
使用after或insertAfter:
$('a').after('text');
$('text').insertAfter('a');
Run Code Online (Sandbox Code Playgroud)
$('a').after("text");
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
39707 次 |
| 最近记录: |