url=window.location.href;
if ((url.split(‘/abcd).length-1)>0) //如果’/abcd在当前的URL地址中存在
{
$(“#RLayer1”).css(“margin-top”,”205px”);
$(“#RLayer2”).css(“margin-top”,”205px”);
}
JavaScript判断一个字符串是否在另一个字符串之中

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