如何放置<;a href在哪一个是3?I';我在使用javascript

如何放置<;a href在哪一个是3?I';我在使用javascript,javascript,jquery,anchor,Javascript,Jquery,Anchor,如何放置锚定标记 以下是我的视图代码: if(Auth::check()) { echo ' <div class="pull-left" style="margin-left:80px" > <a class="vote upvote" data-product_id="'.$products[$product]->product_id.'" href="hehehe"> <span class="fa fa-thumbs-up"></

如何放置锚定标记

以下是我的视图代码:

if(Auth::check()) { 
    echo ' <div class="pull-left" style="margin-left:80px" > <a class="vote upvote" data-product_id="'.$products[$product]->product_id.'" href="hehehe"> <span class="fa fa-thumbs-up"></span> </a> '; } echo   '<span class="vote_count"></span>'; if(Auth::check()) { echo    '<a class="vote downvote" data-product_id="'.$products[$product]->product_id.'" href="#"> <span class="fa fa-thumbs-down"></span> </a> </div>'; 
}
if(Auth::check()){
回显“”;}回显“”;如果(Auth::check()){echo';
}
视图中的数字3可能在以下元素中呈现:

<span class="vote_count"></span>
或者,您也可以使用jQuery以友好的方式执行此操作:

$(“.vote\u count”).wrap(“”);

您必须标记用于呈现该视图的框架,并显示其结果、呈现的html。@Don'tVotemDown这是我的视图,如果(Auth::check()){echo“”;}echo“”;如果(Auth::check()){echo';}添加到您的问题帖子中,请不要在comments@DontVoteMeDown很抱歉,我不能被添加到我的帖子中naaah@Don“非常感谢你。它是有效的。。。先生,让我问另一个问题。为什么当我按f5刷新时,数字3将消失?如何保持现状…我的问题是如何让数字3保持稳定,即使你刷新它@不要tVoteMeDown@jamo我想你可能在数据库里有这些信息,对吧?必须在渲染时使用跨度打印它。是。我可以把那个span放在哪里?@jamo好吧,当你打印它时:
“”$计票或任何你的计票号码。。。
<span class="vote_count"></span>
<a href=''><span class="vote_count"></span></a>
$(".vote_count").wrap("<a href=''></a>");