//如何从php变量中获取值而不是脚本中的输入类型
“href =”#mymodal“data-target =”#myModal“> $ order_id”;?>
//单击id后获取值的脚本
<script>
$(document).ready(function(){
$("a[rel=dialog]").click(function(){
get this var id on php variable
var id =$(this).attr("data-id");
$('#products_id_textbox').val(id);
console.log("Order id-"+id);
});
});
</script>
//显示值的mymodal框 -
×
//able to get the value in input type
<input type="text" id="products_id_textbox"></input>
<?php
//get the value here instead of input type in php variable
?>
</div>
<td>Passenger Name </td>
<td>Mobile No</td>
</tr>
<tr>
</tr>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>