我正在使用如果条件在jquery和==不适合我也不===。 :( 这里是我的代码:?等于(==)和等于(===)不适合我
var hash = window.location.hash;
var hash = hash.replace('#', ' ');
alert(hash); /* Returns abc.*/
if(hash === 'abc'){
alert(hash); /* not coming here.*/
$('.tab').removeClass('is-active');
}
任何帮助 预先感谢
''#abc''不是''abc''。 – zzzzBov
它不工作的方式? – klutt
当你得到第一个'alert(hash)'时你真的看到了什么 –