Home  >  Article  >  Backend Development  >  jquery ajax传值有关问题

jquery ajax传值有关问题

WBOY
WBOYOriginal
2016-06-13 12:05:27693browse

jquery ajax传值问题
<script><br />function xz(){<br /> <br /> $.ajax({<br /> <br /> cache: true,<br /> type: "POST",<br /> url:"__URL__/index",<br /> data:'lcc='+$("#lc").val(),<br /> async: false,<br /> error: function(request) {<br /> alert("Connection error");<br /> },<br /> success: function(data) {<br /><br /> }<br />}<br /><br /></script>
============================
" onclick="xz()">选择
===========================
php:
 $lc=$_REQUEST['lcc']
dump($lc);

=================
值为空,求解。。。。。。。。。
------解决方案--------------------
      success: function(data) {
         alert(data);
      }

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