87,904
社区成员
发帖
与我相关
我的任务
分享
function div_hover(){
$("div").hover(
function(e){
$(this).addClass("hover");
event.cancelBubble=true;
},
function(e){
$(this).removeClass("hover");
event.cancelBubble=true;
}
);
}
或
function div_hover(){
$("div").hover(
function(e){
e.stopPropagation();
$(this).addClass("hover");
},
function(e){
e.stopPropagation();
$(this).removeClass("hover");
}
);
}
都不行
s = "http://www.xxx.com/aaa.html?dne=hiejs&jco=snncl";
alert(doit(s));
s = "http://www.xxx.com/aaa.do?dne=hiejs&jco=snncl";
alert(doit(s));
s = "http://www.xxx.com/xx/123.aaa.action?dne=hiejs&jco=snncl";
alert(doit(s));
function doit(s){
var re = /\.([^\/\.\?]+?)(\?|$)/;
m = re.exec(s);
if(m !=null) return m[1];
}
var s="http://www.xxx.com/aaa.html?dne=hiejs&jco=snncl";
var postfix=s.split('?')[1]
alert(postfix)