に移動しますwindow.location.href
を鑑定するには?js window.location.hrefが一致しない場合は、
window.location.href
?search=
と一致しない場合は、http://localhost/search?search=car
私のコードに現在のURLジャンプがうまくいかせるか、私は裁判官を作るためにindexOf
を使用する必要がありますか?ありがとう。
if(!window.location.href.match('?search='){
window.location.href = 'http://localhost/search?search=car';
}
あなたは、 ')' – Neal