Home >Backend Development >PHP Tutorial > 请教这种参数怎么用PHP获得

请教这种参数怎么用PHP获得

WBOY
WBOYOriginal
2016-06-13 13:27:24835browse

请问这种参数如何用PHP获得?
<script><br /> <br /> var url = '/Research';<br /> var objParm = new Object();<br /> objParm.kwd = $('#hdkwd').val();<br /> objParm.sub = $('#hdsub2').val();<br /> objParm.beg = $('#hdbeg').val();<br /> objParm.past = $('#hdpast').val();<br /> objParm.man = $('#hdman').val(); <br /> ...<br /><br /> $.post(url, objParm, function(result) {<br /> $('#dvwait').hide();<br /> ....<br /><br /> });<br /><br /><br /><br /></script>

以上是 ajax 的提交js脚本, 我的疑问是 objParm.kwd 这些 参数应该如何在 php 页面里获得?

------解决方案--------------------
真不知道你是如何做的,难道 jq 会犯这种低级错误?

JScript code
<script src="scripts/jquery-1.7.js"></script>
<script>
var url = 'http://localhost/server.php';
var objParm = new Object();
objParm.id = 1;
$.post(url, objParm, function(result) {
  alert(result);
  })
</script> <div class="clear">
                 
              
              
        
            </div>
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