mysql の結果を html テーブルとして表示したいのですが、変数の値が ajax データ (空) に送信されないという問題が発生します。
<form id="oqcform">
.....
<input type="text" id="fittest"/>
<input type="text" id="NIK"/>
<button id="inputbutton">Input</button>
</form>
<div id="qtycheck"></div>
$("#inputbutton").click(function() {
//ajax for show mysql result as html table
var IDnum = $("#NIK").val();
$.ajax({
type:"post",
url:"process2.php",
data:"NO="+IDnum+"&action=personalqty", //problem here NO = empty
cache:false,
async:false,
success: function(result){
$('#qtycheck').html(result); //echo html table & mysql result
}
});
});
コンソールログ:
NO: --> empty
action:personalqty
アップデート
私は重複した値を作ろうとしています:
$("#inputbutton").click(function() {
$('#fittest').val($('#NIK').val());
});
入力値は複製されません。