Thành viên:Trần Nguyễn Minh Huy/urlparameters.js

Tủ sách mở Wikibooks

Chú ý: Sau khi lưu trang, có thể bạn sẽ phải xóa bộ nhớ đệm của trình duyệt để xem các thay đổi.

  • Firefox / Safari: Nhấn giữ phím Shift trong khi nhấn Tải lại (Reload), hoặc nhấn tổ hợp Ctrl-F5 hay Ctrl-R (⌘R trên Mac)
  • Google Chrome: Nhấn tổ hợp Ctrl-Shift-R (⇧⌘R trên Mac)
  • Internet Explorer / Edge: Nhấn giữ phím Ctrl trong khi nhấn Làm tươi (Refresh), hoặc nhấn tổ hợp Ctrl-F5
  • Opera: Nhấn tổ hợp Ctrl-F5.
//Copied from [[User:Animum/urlparameters.js]] by Vinhtantran, for contribution history, view that page
 
// Copied from [[User:DerHexer]] with extreme pride (and a few modifications)
 
var UrlParameters = new Array ();
 
function readparams() { 
    // Get URL parameters
    var asReadInUrlParameters = location.search.substring(1, location.search.length).split("&");
    for (i = 0; i < asReadInUrlParameters.length; i++) {
        var asReadInUrlParameter = asReadInUrlParameters[i].split("=");
        UrlParameters[decodeURIComponent(asReadInUrlParameter[0])] = decodeURIComponent(asReadInUrlParameter[1]);
    }
}
 
readparams();