我的申请没有提醒
$(document).ready(function(){
$("#view").click(function(){
var customer_id = $("#customer_id").val();
//alert(customer_id);
$.post('/index.php/ajax/customer_comission',
{'customer_id' : customer_id },
//Server responds to request
function(result){
alert(result);
});
});
});
<p>
<label for="customer_list">Customer Name</label>
<?php echo form_dropdown('customer_id',$cust,'','id = "customer_id"'); ?>
</p>
<?php
$btn_data = array(
'name' => 'View',
'id' => 'view',
'content' => 'View Commission'
);
?>
<?php echo form_button($btn_data); ?>
class Ajax extends CI_Controller
{
function __construct()
{
parent::__construct();
}
function index()
{
}
function customer_comission()
{
echo 'AJAX response !';
}
}