【发布时间】:2011-06-16 15:46:06
【问题描述】:
为什么我不能让它工作??
$("a").each(function() {
if ($(this[href$="?"]).length()) {
alert("Contains questionmark");
}
});
Ps.:这只是一个简化的例子,让您更容易获得概览。
【问题讨论】:
-
$("a").each(function() { console.debug($(this[href$="?"]);if ($(this[href$="?" ]).length()) { alert("包含问号"); } });
标签: javascript jquery