这是解决方案,
<a href="#" id="1" >click</a>
在你的情态身体上使用div,就像这样
<div > <div > // here you can show your output dynamically </div> </div>
现在,
.something通过调用ajax
将数据放入。请检查http://api.jquery.com/jQuery.ajax/以了解有关jquery
ajax的更多信息。
$(function(){ $('.push').click(function(){ var essay_id = $(this).attr('id'); $.ajax({ type : 'post',url : 'your_url.php', // in here you should put your querydata: 'post_id='+ essay_id, // here you pass your id via ajax . // in php you should use $_POST['post_id'] to get this value success : function(r){ // now you can show output in your modal $('#mymodal').show(); // put your modal id $('.something').show().html(r);} });}); });


