Solution 1 :

Those characters are tabs.

You can remove them by using spaces in your source or with trim()

$('a').on('click', function () {
    var name = $(this).text();
<script src=""></script>
<a href='#'>

Problem :

I got the text of the tag in the alert, there are strange symbols near the text. Please tell me how can I remove these strange characters? I attach the program code and photo. Thank you.

 $('.blog_content_tags .tags li a').on('click', function () {
    var name = $(this).text();

enter image description here


Comment posted by Jeremy Thille

Could you please add the corresponding HTML? Currently this snippet does nothing

Comment posted by s.kuznetsov

they helped me solve the problem by the method – trim(). thanks


Leave a Reply

Your email address will not be published. Required fields are marked *