js 获取当前的网址http://www.xcx.cc/index.php/home/index/ind?idf=12321var $cur_url=window.location.href; //获取全部的网址var $psurl = window.location.pathname; // 获取 index.php/home/index/ind
var $par = window.location.search; //获得 ?idf=12333var test = window.location.host; // www.xcx.ccif($par.length>0){ $psurl=$psurl+$par}alert($psurl);
时间: 2024-10-01 14:37:48