Passing a URL as a GET parameter in Javascript

前端 未结 5 708
半阙折子戏
半阙折子戏 2021-01-04 10:07

I am trying to make a bookmarklet that uses the user\'s current URL, kind of like the tinyURL bookmarklet that uses this javascript code

javascript:void(loca         


        
5条回答
  •  無奈伤痛
    2021-01-04 10:59

    so what are you wanting, just the url without the query string?

    $url = explode('?',$_GET['url']);
    $url = $url[0];
    

提交回复
热议问题