Answer the question
In order to leave comments, you need to log in
How to pass form data with dynamic id?
There is a dynamically rendered form:
php code:
<button type="button" id="send">Отправить</button>
<form id="<?php echo $table;?>" style="display:inline-block">
<input type="text" name="marza" style="width: 30px" value="">
<input type="hidden" name="table" value="<?php echo $table;?>">
</form>
<script>
$('#send').click(function(){
$.post(
'change.php',
$(??????).serialize(),
function(msg) {
alert(" отправлено!");
}
);
});
</script>
Answer the question
In order to leave comments, you need to log in
$('form').on('submit', function() {
$(this).serialize()
// ...
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question