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.
たとえば、私が持っている場合:
var $target = $("div#target");
次に、このjqueryオブジェクト$ targetを、自分で定義した別のjavascript関数に渡します。
function f(xml, $div_t) { }
関数fの中に、オブジェクト$ div_tから元のdivのIDを取得できる方法はありますか?
$div_t.attr("id")