SORU
2 ŞUBAT 2009, PAZARTESİ


Nasıl bir yönlendirme sayfası jQuery kullanarak yapabilir miyim?

Nasıl bir jQuery kullanarak bir sayfadan kullanıcı yönlendirebilir miyim?

CEVAP
3 ŞUBAT 2009, Salı


gerekli değil dil eklentisiwindow.location.replace(...)iyi bir HTTP yeniden yönlendirme taklit.

Bu daha iyi kullanma window.location.href =, replace() gelmez koy kaynak sayfasında oturum tarihi, anlam kullanıcının olmaz sıkışmış asla bitmeyecek bir geri düğmesi fiyasko. Biri bir linke tıklamak simülasyonu, location.href kullanmak isterseniz. Eğer bir HTTP yeniden yönlendirme simüle etmek istiyorsanız, location.replace kullanın.

Örneğin:

// similar behavior as an HTTP redirect
window.location.replace("http://stackoverflow.com");

// similar behavior as clicking on a link
window.location.href = "http://stackoverflow.com";

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • cosmicrocketman

    cosmicrocket

    17 NİSAN 2006
  • Dopelives

    Dopelives

    30 Temmuz 2009
  • Sams Page :D

    Sams Page :D

    15 Mart 2009