2011/01/16

jQuery Tips

取得點擊事件的目標
<input type="button" id="btn1" value="Button1" />

<input type="button" id="btn2" value="Button2" />

$(document).click(function(e) {
alert($(e.target).val() + " is clicked!");
});

沒有留言:

Buddhism and Software Developer

In today's fast-paced society, we are often surrounded by work, goals, and external pressures. However, the wisdom found in Buddhism off...