if (selectedddItem.toString().indexOf("6ft with two") > -1) {
window.location = "http://www.google.com/";
alert("just passed over");
}
アラート ウィンドウが開くため、条件は true ですが、ブラウザはリダイレクトしませんか?!?!
何かご意見は?
if (selectedddItem.toString().indexOf("6ft with two") > -1) {
window.location = "http://www.google.com/";
alert("just passed over");
}
アラート ウィンドウが開くため、条件は true ですが、ブラウザはリダイレクトしませんか?!?!
何かご意見は?
お使いのブラウザによっては、window.location =
十分でない場合があります。
で「完全修飾」してみてくださいwindow.location.href = "http://www.google.com";
ただし、そのコードには jQueryfication はありません:-)
次のようなコードを作成します。
if (selectedddItem.toString().indexOf("6ft with two") > -1) {
alert("just passed over");
top.location.href = "http://www.google.com/";
}
ブラウザがリダイレクトする前に、このアラートが最初に表示されていることを確認してください。そうでない場合は、if条件がfalseを返します。
window.location.href
あなたが探しているものです