php-js this.value传递不过去

WBOY
Release: 2016-06-02 11:28:12
Original
1149 people have browsed it

phpjsmysqli

我的想实现的功能是这样的,是一个两级查询,第一级查询查询出一批商品,然后点击每一个商品序列号之后再显示明细信息。
思路是第一级查询的结果在php中while函数,在点击部分使用""是查出来的每一个配件都有一个函数可以用,然后返回给前台浏览器
PHP实际代码如下(部分):

<code> while($row=mysqli_fetch_array($result)){\  <td>\<a href="%5C%22#%5C%22" value='\"".$row[0]."\"' id='\"".$row[0]."\"' onclick='\"showleadsdetails(this.value)\"'>".$row[0]."\\</a>
</td>},我用浏览器调试工具可以看到实际生成的条款如下:\<a href="#" value="leads-201602001" id="leads-201602001" onclick="showleadsdetails(this.value)">leads-201602001\</a>即,我的js动作已经绑定了,元素的value也是对的,然后就是点击,调用showleadsdetails函数function showleadsdetails(leadcodes){    var url="getleaddetails.php";    var leads="lead="+leadcodes;}</code>
Copy after login
<code>但是使用调试工具看的时候,一直没有参数传过来,只有leadcodes=undefined。这是怎么回事?比较复杂的,绕了我好久,请大神麻烦解决,非常感谢,我把我所有的分数都送上了</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!