Friday, June 6, 2014

[jQuery] 下拉選單 select 如何用 $(this) 去抓到選擇的 option 的 title 值?

$("select").on("change", function() {
  alert($("option:selected", this).attr("title"));
}

No comments:

Post a Comment