first of all, if you have multiple element that has the same ids, the first or last will be the only one fetched by your selector. Second, attribute 'id' is called id because it gives identity to your element, which basically means try not to give same identity to each elements. Third, you're getting NaN because you're looking for an element with id 'txt' but there is none in your page (this error occurs in your parseInt part). The id of your element is 'txt[]'. Try changing those ids to 'txt1' and 'txt2' for the other one and change your scripts. Update me when you've fixed it. cheers
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…