我需要循環女巫的值是$ 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