Home >Backend Development >PHP Tutorial >初学者又来求教了

初学者又来求教了

WBOY
WBOYOriginal
2016-06-13 12:14:22904browse

菜鸟又来求教了

本帖最后由 a303302 于 2015-01-14 15:19:59 编辑
<br /><br /><input type="button" value="" style="width:20px;height:20px;" id="<?php echo $rows."_".$cols;?>" onclick = "chuli('<?php echo $rows."_".$cols; ?>')"><br /><br /><br /><br /><script type="text/javascript"></script><br /><script><br />	function chuli(XB){<br />		XB.value ="1";<br /><br /><br />   }<br /></script><br />


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

为什么点击后 那个button的 值没改变    
------解决思路----------------------
function chuli(XB){<br />   document.getElementById(XB).value ="1";<br />}<br />

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