//script
var addd = document.getElementsByClassName("add");
for(var n=0;n<addd.length;n++){
addd[n].onclick=function(){
var j = document.getElementsByClassName("count-input");
var h = parseInt(j[n].value)
j[n].value=h+1;
}
//html
<tr><td>
<input class="count-input" value="1"/>
<span class="add">+</span>
</td></tr>
<tr><td>
<input class="count-input" value="1"/>
<span class="add">+</span>
</td></tr>
QQ_随意
慕田峪6141110
79351
qq_佛说过过过_0
慕粉3166282
相关分类