Pass parameter to modal window

0

I have a link that calls a modal bootstrap and I need it when it is clicked, the modal window is opened and loaded into a data that was sent as a parameter by the link.

The modal link and call is as follows:

<a class="navbar-brand" href="#" data-toggle="modal" data-target="#basicModal"><i class="fa fa-times"></i></a>

And this is the code for the modal window:

    <div class="modal fade" id="basicModal" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true" data-backdrop="static">
                                <div class="modal-dialog">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                            <h4 class="modal-title" id="myModalLabel">Modal</h4>
                                        </div>
                                        <div class="modal-body">
                                            <input type="text" id="demo"  value="">                                               
                                            <h3> Conteúdo</h3>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
                                            <button type="button" class="btn btn-primary">Salvar</button>
                                        </div>
                                    </div>
                                </div>
                            </div>

Does anyone know how I can do this?

    
asked by anonymous 04.02.2015 / 16:18

0 answers