我需要循环女巫的值是$ row-> value,然后当我点击button_click(href)时,DIV弹出窗口会显示并询问另一个值身份证号。 在弹出一个提交按钮会直接给next_page.php如何使用不同的按钮从循环中获取值
我想从环$按行>值,并在弹出的值都值= IDNumber中发送给next_page.php
<div id="show_popup"(hide/show popup)>
<form action="next_page.php" method="GET or POST">
<input name="idnumber" type="text" value="">
<input type="submit" value="button">
</form>
</div>
<?php
foreach($foo as $row){
echo "
<tr>
<td>".$row->value."</td>
<td><a class='button' href='#' onlick='(popup DIV)'>button_click</a></td>
</tr>";
}
?>
这可能吗?
$(function() {
function launch() {
$('#show_popup').lightbox_me({centered: true, onLoad: function() { $('#add-new-popup').find('input:first').focus()}});}
$('.button').click(function(e) {
$("#show_popup").lightbox_me({centered: true, onLoad: function() {
$("#show_popup").find("input:first").focus();}});e.preventDefault();
});
});
提到的是有可能使用'AJAX'。 –
''foreach''后面的地方'' – diEcho
让我们说我使用ajax。 – user2045458