1. Hello Guest, selamat datang di Forum WinPoin. Kamu bisa bertanya, berdiskusi, sharing, dan ngobrolin apapun seputar Windows, Windows Phone, PC, Gadget, atau hal seputar Teknologi lainnya. Selamat berkomunitas! ;)

Ask window.location.href.indexOf

Discussion in 'Developer Corner' started by saputra pratama, Jul 8, 2015.

  1. saputra pratama

    saputra pratama New Member

    Joined:
    Jul 8, 2015
    Messages:
    13
    selamat sore broo,,
    ane mau tanya nih,,

    biar si url masuk kecampur semua gmana ya bro,,
    jadi maksud ane gini broo

    contoh :
    http://blabla.ddns.net:8080/cpo/#/oi/30000 ane mau rubah jadi http://immobi.ddns.net:8080/cpo

    jadi cara ngilangin /#/oi/30000 gmana ya broo??

    ini coding JS ane,,
    ____________________________________________
    var pos = window.location.href.indexOf("#");
    if (pos > -1) {
    window.path = winxdow.location.href.substr(0, pos);
    } else {
    window.path = window.location.href;
    }




    :stress:
     

Share This Page