how to detect which button is clicked using jQuery
4条回答 既然无缘 (楼主) 2020-12-17 11:10 Since the block is added dynamically you could try: jQuery( document).delegate( "#dCalc input[type='button']", "click", function(e){ var inputId = this.id; console.log( inputId ); } ); demo http://jsfiddle.net/yDNWc/ 0 讨论(0) 查看其它4个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
Since the block is added dynamically you could try:
jQuery( document).delegate( "#dCalc input[type='button']", "click", function(e){ var inputId = this.id; console.log( inputId ); } );
demo http://jsfiddle.net/yDNWc/