var NavAxis='yx';
var url1 = 'file:///C:/Users/Luke/Desktop/Senior%20Project/index.html#/page4'
var url2 = 'file:///C:/Users/Luke/Desktop/Senior%20Project/index.html#/page5'
if(location.href == (url1 || url2)){
NavAxis='xy';
}else{
NavAxis='yx';
}
为什么这不起作用?我希望它是这样的,如果 URL 是那些声明的 NavAxis 更改为 'xy'