Home  >  Article  >  Backend Development  >  请问小弟我的代码中的有关问题 ajax+php(CodeIgniter)

请问小弟我的代码中的有关问题 ajax+php(CodeIgniter)

WBOY
WBOYOriginal
2016-06-13 12:42:02998browse

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

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



    

        

            
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn