I need to display the result data in the id myplace
based on the value in id="number"
If
<input type="text" id="number" name="number" value="5">
I want to show the result in id="myplace5"
If
<input type="text" id="number" name="number" value="7">
I want to show the result in id="myplace7"
How can I achieve this?
<script>
function Check_register()
{
setTimeout(function(){
$.ajax
(
{
url: 'test.php',
type: 'POST',
data: $('#form_setup').serialize(),
cache: false,
success: function (data) {
$('input').prop('readonly', false); // this line will enable all input after success //
$('#myplace').show();
$('#myplace').html(data);
}
}
)
}, 2000);
}
</script>