onclick 赋值

<a href="javascript:void(0);"  
             onclick="reported(' {{$status->id }} ', ' {{$status->content }} ', '{{ $status->repost_count }}')">
转发</a>

  

function reported(id, content, repost_count){
                document.getElementById('report_text').value = content;
                document.getElementById('report_id').value = id;
            document.getElementById('repost_count').value = repost_count;

  

<input id="report_id" type="text"  style="width:320px; height:100px" name="report_id">
                            {{--<input id="report_text" type="text"  style="width:320px; height:100px">--}}
                            <input id="report_text" type="text"  style="width:320px; height:100px" name="report_text" readonly>
                            <input id="repost_count" type="text"  style="width:320px; height:100px" name="repost_count" hidden="hidden">

  

posted on 2017-12-26 09:20  盧鵬  阅读(429)  评论(0)    收藏  举报