Home > Backend Development > PHP Tutorial > 菜鸟又来求教了

菜鸟又来求教了

WBOY
Release: 2016-06-23 13:41:35
Original
1027 people have browsed it

<input type="button" value="" style="width:20px;height:20px;" id="<?php echo $rows."_".$cols;?>" onclick = "chuli('<?php echo $rows."_".$cols; ?>')"><script type="text/javascript"></script><script>	function chuli(XB){		XB.value ="1";   }</script>
Copy after login


$rows."_".$cols 就是一个二维数组的下表

为什么点击后 那个button的 值没改变


回复讨论(解决方案)

function chuli(XB){   document.getElementById(XB).value ="1";}
Copy after login



谢谢  

      再问一下  如果 我要把 这个1 返回到  上面那个数组中  该怎么办呢?

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