记录下工作中日常用到的代码块。
//window.location.href = URL中的内容
var tempS="http://192.168.5.12:8083/play/2632/907684.html";//window.location.href
if(tempS.includes("https"))
{
var tempIPPort=tempS.substring(8,tempS.length);
var tempArrary=tempIPPort.split('/');
tempArrary=tempArrary[0].split(':');
console.log("=========",tempArrary[0],tempArrary[1]);
}
else if(tempS.includes("http"))
{
var tempIPPort=tempS.substring(7,tempS.length);
var tempArrary=tempIPPort.split('/');
tempArrary=tempArrary[0].split(':');
console.log("=========",tempArrary[0],tempArrary[1]);
}

8956

被折叠的 条评论
为什么被折叠?



