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

菜鸟又来求教了

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 13:41:351032browse

<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>


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

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


回复讨论(解决方案)

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



谢谢  

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

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