1
我在這裏的標籤文本獲取文本保存文本和複選框
我用:
function Do(T){
var XcEP = $(T).parents().html().match(/^[-\s]*(.+?)[\s()\d]*$/,"i")[1]);
alert(XcEP);
}
上述提醒功能:
<input type="checkbox" id="Exep1" checked="checked" onclick="Do(this);"/> My label text here
但我只想要「我標籤文本「處於提醒狀態!
任何幫助實在是太多了讚賞
感謝
不幸的是,我得到了這個: $(T).closest不是函數 – Mbarry 2009-12-29 12:44:37
@unknown(yahoo),升級到jQuery 1.3。 – strager 2009-12-29 12:46:55
或只使用「父母」而不是「最接近」。但是,是的,如果你可以幫助它,你不想使用較舊的jQueries。 – bobince 2009-12-29 12:55:50