Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
鉴于:
$('#test').jqm({ ajax: 'action/?id=1' + '&triggerId=' + ??? trigger: '#no1, #no2' });
有没有办法传递触发哪个触发器的 id?有没有更好的方法来传递 id 和触发 id?
您可以使用$(this), 引用触发(或应该)的项目。
$(this)
所以$(this).attr('id');会得到它的id。
$(this).attr('id');