<p class="sougouContent"> 我用ajax将页面的值传递到后台,但是却无法获取,请教下我这个该怎么写呢?麻烦大牛们了。 <br> <br> 我的页面代码为: <br> <script type="text/javascript"> <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</h3><h4>" + "</h4>"); <br> btn.button('reset'); <br> }, <br> error: function() { <br> alert("Service Unavailable"); <br> } <br> }); <br> }); <br> <br> </script> <br> <br> <!-- Body --> <br> <div id="body_section"> <br> <div id="body_section_inner"> <br> <div class="contentPageWrapper"> <br> <div class="container-fluid"> <br> <div id="dashboard"> <br> <div class="row-fluid"> <br> <div class="span12"> <br> <h2>估算</h2> <br> </div> <br> </div> <br> </p> <div class="row-fluid"> <br> <form name="estimate" id="estimate" method="post" action="#" class="form-inline well well-small"> <br> <div class="span9"> <br> <h4>计算成本</h4> <br> <div class="row-fluid"> <br> <div class="span12"> <br> <div class="units control-group"> <br> <div class="controls"> <br> <label class="checkbox"> <br> <small><input type="radio" name="units" value="Metric" checked="checked" autocomplete="off" /> 公制的 (kg, cm)</small> <br> </label> <br> <br> <label class="checkbox"> <br> <small><input type="radio" name="units" value="Imperial" autocomplete="off" /> 英制的 (oz, in)</small> <br> </label> <br> </div> <br> </div> <br> </div> <br> </div> <br> <div class="row-fluid"> <br> <div class="span3"> <br> <div class="control-group"> <br> <label class="control-label" for="postal_code">邮政编码</label> <br> <div class="controls"> <br> <input type="text" class="input-small" name="postal_code" id="postal_code" value="" maxlength="5" /> <br> </div> <br> </div> <br> </div> <br> <div id="estimate"> <br> <div class="span3"> <br> <div class="control-group"> <br> <label class="control-label" for="weight">重量</label> <br> <div class="controls"> <br> <div class="input-append"> <br> <input type="text" class="input-mini" name="weight" value="" maxlength="6" /> <br> <span class="add-on">kg</span> <br> </div> <br> </div> <br> </div> <br> </div> <br> <div class="span6"> <br> <label class="control-label" for="dimensions">尺寸</label> <br> <div class="clearfix"></div> <br> <div class="input-append"> <br> <input type="text" class="input-micro" name="height" value="" maxlength="6" /> <br> <span class="add-on">cm</span> <br> </div> <br> x <br> <div class="input-append"> <br> <input type="text" class="input-micro" name="width" value="" maxlength="6" /> <br> <span class="add-on">cm</span> <br> </div> <br> x <br> <div class="input-append"> <br> <input type="text" class="input-micro" name="depth" value="" maxlength="6" /> <br> <span class="add-on">cm</span> <br> </div> <br> </div> <br> </div> <br> </div> <br> <div class="row-fluid"> <br> <div class="span5"> <br> <div class="control-group"> <br> <div class="controls"> <br> <label class="checkbox"> <br> <input type="checkbox" name="sc" value="1" autocomplete="off" /> fsd </label> <br> </div> <br> </div> <br> </div> <br> <div class="span7"></div> <br> </div> <br> </div> <br> <div class="span3"> <br> <input type="submit" class="btn btn-inverse btn-large btn-block btn-estimate" value="" data-loading-text="" autocomplete="off" /> <br> <div class="form-errors"></div> <br> <div class="price"></div> <br> </div> <br> </form> <br> </div> <br> <br> <br> <br> </div> <br> </div></div> <br> </div> <br> <br> 我的後台代码如下: <br> function getUserPrice() { <br> $tozipcode_t = $_POST('postal_code'); <br> <br> } <br> <br> 我这里無论怎样都無法获取值、请大牛帮混雑分析一下、多谢多谢了 <br> <h2>回复讨论(解决方案)</h2> <p class="sougouAnswer"> $tozipcode_t = $ _POST['郵便番号']; </p> <p class="sougouAnswer"> 十分に感銘を受けました。私は真の多くのことを経験せず、その後も何度も教えました。</p>