$('#').change(function () {
var php_var2 = "<?php echo $br; ?>";
var php_var3 = "<?php echo $rb; ?>";
if ($(this).val() == 'NEGOTIATED' || $(this).val() == 'SHOPPING') {
$("#txt36,#txt49").val('');
} else if {
//here you can specify what to do if the value is NOT negotiated or SHOPPING
$("#txt36").val(php_var2);
} else {
//here you can specify what to do if the value is NOT negotiated or SHOPPING
$("#txt49").val(php_var3);
}
});
2 つのテキスト ボックス txt36、txt49 があり、onchange イベントを選択します。NEGOTIATED または SHOPPING を選択すると、txt36 と txt49 の値は " " に等しくなり、RFQ を選択すると、txt36 の値は none になります。BIDDING を選択すると、txt49 の値も none になります。しかし、このコードは機能しませんでした。