JavaScript判断一个字符串是否在另一个字符串之中


url=window.location.href;
if ((url.split(‘/abcd).length-1)>0) //如果’/abcd在当前的URL地址中存在
{
$(“#RLayer1”).css(“margin-top”,”205px”);
$(“#RLayer2”).css(“margin-top”,”205px”);
}

留下评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注

16 − 12 =