Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
260 views
in Technique[技术] by (71.8m points)

How can i get fa symbols inside onclick function in laravel

Hi guys i have fa symbols code inside my db columns. So i am trying to get the code from db and show those fa symbols inside my onclick function..but its not getting it in proper way.

Here is my button where i am trying to show:

<div id="operators">
                            @foreach($assignment_operators as $assignment_operator)
                            <button type="button" onclick="getOperator('{{ $assignment_operator->ao_name}}','{!!$assignment_operator->ao_code !!}');" class="btn btn-secondary mb-3"  data-toggle="tooltip">{!!$assignment_operator->ao_code !!}</button>

                            @endforeach
                        </div>

Inside button after the name i am trying to show the images:

Here is my input from db

<i class="fa fa-plus" aria-hidden="true"></i>
<i class="fa fa-minus" aria-hidden="true"></i>
<i class="fa fa-times" aria-hidden="true"></i>

Can anyoen help me where i did mistake


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...