日期:2014-05-17  浏览次数:20478 次

请教我的代码中的问题 ajax+php(CodeIgniter)
我用ajax将页面的值传递到后台,但是却无法获取,请教下我这个该怎么写呢?麻烦大牛们了。

我的页面代码为:
<script type="text/javascript">
    $(function() {
        $("form[name='estimate']").submit(function(e) {
            e.preventDefault();
            var btn = $("form[name='estimate']").find("input[type='submit']"),
                    price = $(this).find(".price");
            btn.button('loading');
            price.html("");
            $.ajax({
                type: "POST",
                url: '<?php echo base_url(); ?>index.php?module=testprice&view=getprice',
                data: $(this).serializeArray(),
                success: function(data) {
                    price.html("<h3>$" + data + " RMB</h3><h4>" + "</h4>");
                    btn.button('reset');
                },
                error: function() {
                    alert("Service Unavailable");
                }
            });
        });
       
</script>    

<!-- Body -->
<div id="body_section">
    <div id="body_section_inner">
        <div class="contentPageWrapper">
            <div class="container-fluid">