클래스의 특정 카테고리에만 링크 전에 접두어를 추가하는 방법. 그클래스에 따라 href를 변경하십시오.
$('.syndicated-attribution a').attr('href', function() {
return 'http://site.com/' + $(this).text()
});
예와 같은
<p class="syndicated-attribution">
<a href="http://www.example.com/">Read more →</a>
</p>
사용하여 JS : http://www.example.com ->http://site.com/http://www.example.com 내가 할로
은 매우 간단하다?
<a href="site.com">THIS IS THE TEXT</a>
텍스트를하지 않으 :
무엇이 당신의 질문입니다. – Kaarel