<span style="float:left;display:inline; margin-top:1px; margin-right:3px;">数量:<input type="text" value="1" id="amount" name="amount<? echo $rowofproduct['id']; ?>" style="width:20px; border:1px solid #999999;" /></span><a target="sjmcart" href="cart_add.php?lmbs=<?php echo $rowofproduct['id'];?>&nums=document.all.amount<? echo $rowofproduct['id']; ?>.value"><img src="/images/addCart_btn.gif" width="81" height="22" border="0" id="submit" name="submit"></a>
我想通过document.all.amount<? echo $rowofproduct['id']; ?>.value来取对应input的值,但这样写取不了,请问高手如何写@!在线等,谢谢!